The properties of System.Web.UI.WebControls.GridView are listed below. For a list of all members, see the GridView Members list.
See Also: Inherited members from System.Web.UI.WebControls.CompositeDataBoundControl
| AllowPaging | bool.
Gets or sets a value indicating whether the paging feature is enabled. | |
| AllowSorting | bool.
Gets or sets a value indicating whether the sorting feature is enabled. | |
| [read-only] | AlternatingRowStyle | TableItemStyle.
Gets a reference to the System.Web.UI.WebControls.TableItemStyle object that enables you to set the appearance of alternating data rows in a System.Web.UI.WebControls.GridView control. |
| AutoGenerateColumns | bool.
Gets or sets a value indicating whether bound fields are automatically created for each field in the data source. | |
| AutoGenerateDeleteButton | bool.
Gets or sets a value indicating whether a System.Web.UI.WebControls.CommandField field column with a Delete button for each data row is automatically added to a System.Web.UI.WebControls.GridView control. | |
| AutoGenerateEditButton | bool.
Gets or sets a value indicating whether a System.Web.UI.WebControls.CommandField field column with an Edit button for each data row is automatically added to a System.Web.UI.WebControls.GridView control. | |
| AutoGenerateSelectButton | bool.
Gets or sets a value indicating whether a System.Web.UI.WebControls.CommandField field column with a Select button for each data row is automatically added to a System.Web.UI.WebControls.GridView control. | |
| BackImageUrl | string.
Gets or sets the URL to an image to display in the background of a System.Web.UI.WebControls.GridView control. | |
| [read-only] | BottomPagerRow | GridViewRow.
Gets a System.Web.UI.WebControls.GridViewRow object that represents the bottom pager row in a System.Web.UI.WebControls.GridView control. |
| Caption | string.
Gets or sets the text to render in an HTML caption element in a System.Web.UI.WebControls.GridView control. This property is provided to make the control more accessible to users of assistive technology devices. | |
| CaptionAlign | TableCaptionAlign.
Gets or sets the horizontal or vertical position of the HTML caption element in a System.Web.UI.WebControls.GridView control. This property is provided to make the control more accessible to users of assistive technology devices. | |
| CellPadding | int.
Gets or sets the amount of space between the contents of a cell and the cell's border. | |
| CellSpacing | int.
Gets or sets the amount of space between cells. | |
| [read-only] | Columns | DataControlFieldCollection.
Gets a collection of System.Web.UI.WebControls.DataControlField objects that represent the column fields in a System.Web.UI.WebControls.GridView control. |
| DataKeyNames | string[].
Gets or sets an array that contains the names of the primary key fields for the items displayed in a System.Web.UI.WebControls.GridView control. | |
| [read-only] | DataKeys | DataKeyArray.
Gets a collection of System.Web.UI.WebControls.DataKey objects that represent the data key value of each row in a System.Web.UI.WebControls.GridView control. |
| EditIndex | int.
Gets or sets the index of the row to edit. | |
| [read-only] | EditRowStyle | TableItemStyle.
Gets a reference to the System.Web.UI.WebControls.TableItemStyle object that enables you to set the appearance of the row selected for editing in a System.Web.UI.WebControls.GridView control. |
| [read-only] | EmptyDataRowStyle | TableItemStyle.
Gets a reference to the System.Web.UI.WebControls.TableItemStyle object that enables you to set the appearance of the empty data row rendered when a System.Web.UI.WebControls.GridView control is bound to a data source that does not contain any records. |
| EmptyDataTemplate | System.Web.UI.ITemplate.
Gets or sets the user-defined content for the empty data row rendered when a System.Web.UI.WebControls.GridView control is bound to a data source that does not contain any records. | |
| EmptyDataText | string.
Gets or sets the text to display in the empty data row rendered when a System.Web.UI.WebControls.GridView control is bound to a data source that does not contain any records. | |
| EnableSortingAndPagingCallbacks | bool.
Gets or sets a value indicating whether client-side callbacks are used for sorting and paging operations. | |
| [read-only] | FooterRow | GridViewRow.
Gets a System.Web.UI.WebControls.GridViewRow object that represents the footer row in a System.Web.UI.WebControls.GridView control. |
| [read-only] | FooterStyle | TableItemStyle.
Gets a reference to the System.Web.UI.WebControls.TableItemStyle object that enables you to set the appearance of the footer row in a System.Web.UI.WebControls.GridView control. |
| GridLines | GridLines.
Gets or sets the gridline style for a System.Web.UI.WebControls.GridView control. | |
| [read-only] | HeaderRow | GridViewRow.
Gets a System.Web.UI.WebControls.GridViewRow object that represents the header row in a System.Web.UI.WebControls.GridView control. |
| [read-only] | HeaderStyle | TableItemStyle.
Gets a reference to the System.Web.UI.WebControls.TableItemStyle object that enables you to set the appearance of the header row in a System.Web.UI.WebControls.GridView control. |
| HorizontalAlign | HorizontalAlign.
Gets or sets the horizontal alignment of a System.Web.UI.WebControls.GridView control on the page. | |
| [read-only] | PageCount | int.
Gets the number of pages required to display the records of the data source in a System.Web.UI.WebControls.GridView control. |
| PageIndex | int.
Gets or sets the index of the currently displayed page. | |
| [read-only] | PagerSettings | PagerSettings.
Gets a reference to the System.Web.UI.WebControls.PagerSettings object that enables you to set the properties of the pager buttons in a System.Web.UI.WebControls.GridView control. |
| [read-only] | PagerStyle | TableItemStyle.
Gets a reference to the System.Web.UI.WebControls.TableItemStyle object that enables you to set the appearance of the pager row in a System.Web.UI.WebControls.GridView control. |
| PagerTemplate | System.Web.UI.ITemplate.
Gets or sets the custom content for the pager row in a System.Web.UI.WebControls.GridView control. | |
| PageSize | int.
Gets or sets the number of records to display on a page in a System.Web.UI.WebControls.GridView control. | |
| RowHeaderColumn | string.
Gets or sets the name of the column to use as the column header for the System.Web.UI.WebControls.GridView control. This property is provided to make the control more accessible to users of assistive technology devices. | |
| [read-only] | Rows | GridViewRowCollection.
Gets a collection of System.Web.UI.WebControls.GridViewRow objects that represent the data rows in a System.Web.UI.WebControls.GridView control. |
| [read-only] | RowStyle | TableItemStyle.
Gets a reference to the System.Web.UI.WebControls.TableItemStyle object that enables you to set the appearance of the data rows in a System.Web.UI.WebControls.GridView control. |
| [read-only] | SelectedDataKey | DataKey.
Gets the System.Web.UI.WebControls.DataKey object that contains the data key value for the selected row in a System.Web.UI.WebControls.GridView control. |
| SelectedIndex | int.
Gets or sets the index of the selected row in a System.Web.UI.WebControls.GridView control. | |
| [read-only] | SelectedRow | GridViewRow.
Gets a reference to a System.Web.UI.WebControls.GridViewRow object that represents the selected row in the control. |
| [read-only] | SelectedRowStyle | TableItemStyle.
Gets a reference to the System.Web.UI.WebControls.TableItemStyle object that enables you to set the appearance of the selected row in a System.Web.UI.WebControls.GridView control. |
| [read-only] | SelectedValue | object.
Gets the data key value of the selected row in a System.Web.UI.WebControls.GridView control. |
| ShowFooter | bool.
Gets or sets a value indicating whether the footer row is displayed in a System.Web.UI.WebControls.GridView control. | |
| ShowHeader | bool.
Gets or sets a value indicating whether the header row is displayed in a System.Web.UI.WebControls.GridView control. | |
| [read-only] | SortDirection | SortDirection.
Gets the sort direction of the column being sorted. |
| [read-only] | SortExpression | string.
Gets the sort expression associated with the column or columns being sorted. |
| [read-only] | TopPagerRow | GridViewRow.
Gets a System.Web.UI.WebControls.GridViewRow object that represents the top pager row in a System.Web.UI.WebControls.GridView control. |
| UseAccessibleHeader | bool.
Gets or sets a value indicating whether a System.Web.UI.WebControls.GridView control renders its header in an accessible format. This property is provided to make the control more accessible to users of assistive technology devices. |
| [read-only] override | TagKey | System.Web.UI.HtmlTextWriterTag.
Gets the System.Web.UI.HtmlTextWriterTag value for the System.Web.UI.WebControls.GridView control. |