asp.net.ph

GridView.ShowHeader Property

System.Web.UI.WebControls Namespace   GridView Class


.NET Framework version 2.0

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

Syntax


Inline <asp:gridview showheader = true | false ... >
Script GridView.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 GridView. 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 GridView 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 header" : "Show header";
}
  C# VB

 Show me 

See Also

GridView Members   HeaderStyle   ShowFooter 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