asp.net.ph

DataGrid.ShowHeader Property

System.Web.UI.WebControls Namespace   DataGrid Class


Sets or retrieves a value specifying whether the header is displayed in the DataGrid control.

Syntax


Inline <asp:datagrid showheader = true | false ... >
Script DataGrid.ShowHeader [ = true | false ]

Property Value

This property accepts or returns only a boolean value: true to display the header; otherwise, false. Default value is true.

Remarks

Set this property to true to display the header in the DataGrid. The appearance of the header is controlled by using the HeaderStyle property.

Example

The following example demonstrates how to programmatically set the ShowHeader property to hide or show the header on the DataGrid control at run time, depending on user input.

void ShowHide ( Object src, EventArgs E ) {
   myGrid.ShowHeader = myGrid.ShowHeader ? false : true;
   myButton.Text = myGrid.ShowHeader ? "Hide footer" : "Show footer";
}
  C# VB

 Show me 

See Also

DataGrid Members   HeaderStyle Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph