System.Web.UI.WebControls Namespace DataGrid Class
Sets or retrieves a value specifying whether the footer is displayed in the DataGrid control.
Inline |
<asp:datagrid showfooter = true | false ... > |
Script |
DataGrid.ShowFooter [ = true | false ] |
This property accepts or returns only a boolean value: true to display the footer; otherwise, false. Default value is true.
Set this property to true to display the footer in the DataGrid. The appearance of the footer is controlled by using the FooterStyle property.
The following example demonstrates how to programmatically set the ShowFooter property to hide or show the footer on the DataGrid control at run time, depending on user input.
void ShowHide ( Object src, EventArgs E ) {
myGrid.ShowFooter = myGrid.ShowFooter ? false : true;
myButton.Text = myGrid.ShowFooter ? "Hide footer" : "Show footer";
}
Sub ShowHide ( src As Object, E As EventArgs )
myGrid.ShowFooter = Iif ( myGrid.ShowFooter, False, True )
myButton.Text = Iif ( myGrid.ShowFooter, "Hide footer", "Show footer" )
End Sub |
|
C# |
VB |
Show me
DataGrid Members FooterStyle