Table of Contents
Grid Properties

The properties of the Grid class are listed below. For a complete list of Grid class members, see the Grid Members topic.

Properties
Name Description
AccessKey (inherited from WebControl) 
Adapter (inherited from Control) 
AddedItems Get a list of items that have been added on the client side.
AllowColumnReorder Gets or sets a value indicating whether to allow user to reorder columns by drag drop.
AllowNewItem Gets or sets whether the grid allows user to append new items.
AllowPaging Gets or sets a value indicating whether to allow paging.
AppRelativeTemplateSourceDirectory (inherited from Control) 
Attributes (inherited from WebControl) 
BackColor (inherited from WebControl) 
BorderColor (inherited from WebControl) 
BorderImages (inherited from WebControl) Provides a list of images used to create customized borders for the control.
BorderStyle (inherited from WebControl) 
BorderWidth (inherited from WebControl) 
ChangedItems Get a list of all items that have been changed on the client side.
CheckedItems Get a list that contains all checked items.
ChildControlsCreated (inherited from Control) 
ClientID (inherited from Control) 
ClientIDMode (inherited from Control) 
ClientIDSeparator (inherited from Control) 
ClientSideAfterEditItem Gets or sets the name of the client side JavaScript function to be called when an item exits edit mode.
ClientSideBeforeEditItem Gets or sets the name of the client side JavaScript function to be called when an item is about to enter edit mode.
ClientSideOnCellOver Gets or sets the name of the client side function to be called when mouse is over a grid cell.
ClientSideOnCellSelected Gets or sets the name of the client side JavaScript function to be called when a cell is selected.
ClientSideOnColumnReorder Gets or sets the name of the client side function to be called when a column is moved.
ClientSideOnColumnResize Gets or sets the name of the client side function to be called when a column is resized.
ClientSideOnContextMenu Gets or sets the name of the client side function to be called to display a context menu when an item is right-clicked.
ClientSideOnError (inherited from WebControlBase) Gets or sets the name of the JavaScript function that is called when an error occurs on client side.
ClientSideOnEvalVar (inherited from WebControl) Specifies the name of client side JavaScript function which is called when a variable needs to be evaluated in a client template.
ClientSideOnItemCommand Gets or sets the name of the client side JavaScript function to be called when any button in a ButtonColumn is clicked.
ClientSideOnItemOver Gets or sets the name of the client side function to be called when mouse is over a grid item.
ClientSideOnItemSelected Gets or sets the name of the client side JavaScript function to be called when an item is selected.
ClientSideOnLoad (inherited from WebControlBase) Gets or sets the name of the JavaScript function that is called when the control is loaded on the client side.
ClientSideOnMessage (inherited from WebControlBase) Gets or sets the name of the JavaScript function that is called when the control displays a message.
ClientSideOnSort Gets or sets the name of the client side function to be called when a column is sorted in client running mode.
ClientSideOnUnload (inherited from WebControlBase) Gets or sets the name of the JavaScript function that is called when the control is unloaded on the client side.
ColumnHeaderAscImage Gets or sets the image to be displayed on a column header to indicate items are sorted in ascending order.
ColumnHeaderDescImage Gets or sets the image to be displayed on a column header to indicate items are sorted in descending order.
ColumnHeaderDividerImage Gets or sets the URL of the image to be displayed between column headers to create a visual divider between two adjacent columns.
ColumnHeaderDividerOffset Gets or sets the column divider image offset relative to the dividing point of two adjacent columns.
ColumnHeaderHeight Gets or sets the height of the column header in pixel.
ColumnHeaderHoverStyle Gets or sets the styles to be applied to a column header when the mouse hovers over it.
ColumnHeaderSortImageOffset Gets or sets the sort image offset relative to the right edge of the column header.
ColumnHeaderStyle Gets or sets the styles to be applied to each column header.
ColumnHeaderTextStyle Gets or sets the style to be applied to column header text.
ColumnHeaderVisible Gets or sets a value indicating whether column headers are visible.
Columns Gets a collection of GridColumn objects that represents each grid columns.
ColumnTemplates Gets a collection of GridColumn objects that are used as templates for the real columns.
ContentPaneStyle Gets or sets the style to be applied to the content pane.
Context (inherited from Control) 
ContextCell Returns a GridCell object that has displayed a context menu and subsequently the context menu triggered a server event.
ContextItem Returns a GridItem object that has displayed a context menu and subsequently the context menu triggered a server event.
Controls (inherited from Control) 
ControlSkinID (inherited from WebControl) Specifies the ID of the skin used by this control.
ControlStyle (inherited from WebControl) 
ControlStyleCreated (inherited from WebControl) 
CssBlock (inherited from WebControl) Specifies the CSS style definition used by this control.
CssClass (inherited from WebControl) 
CssFile (inherited from WebControl) Specifies the path of an external CSS file that provides CSS styles used by this control.
CurrentPage Gets or sets the zero based current page index.
CurrentPageButtonFormat Gets or sets the format string used to create the HTML text for pager buttons that represents the current page.
DataItem (inherited from DataBoundControl) The current data item during data binding.
DataItemContainer (inherited from Control) 
DataKeysContainer (inherited from Control) 
DataSource (inherited from DataBoundControl) Gets or sets the data source used by the control.
DataSourceID (inherited from DataBoundControl) Gets or sets the ID of this control's data source object. Used in .NET 2.0 only.
DataTable Gets or sets the table name to be used when the data source is a DataSet object.
DeletedItems Get a list of items that have been deleted on the client side.
DesignMode (inherited from Control) 
DesignOptions (inherited from WebControl) Contains options used for design time preview.
EditCellIndex Gets or sets the intial edit cell index.
EditItemIndex Gets or sets the intial edit item index.
EmptyDataText Gets or sets the HTML to be displayed when the Grid has no data.
Enabled (inherited from WebControl) 
EnableKeyboardNavigation (inherited from WebControl) Gets or sets a value indicating whether keyboard navigation should be enabled.
EnableTheming (inherited from WebControl) 
EnableViewState (inherited from Control) 
Events (inherited from Control) 
FirstPageButtonHtml Gets or sets the HTML for the pager button that would navigate to the first page.
FixedBottomItemCount Gets or sets the number of fixed row on the bottom.
FixedBottomItemHeight Gets or sets the height of the each fixed bottom items.
FixedBottomItemStyle Gets or sets the styles to be applied to each fixed bottom item.
FixedColumnCount Gets or sets the number of fixed columns.
FixedTopItemCount Gets or sets the number of fixed row on the top.
FixedTopItemHeight Gets or sets the height of the each fixed top items.
FixedTopItemStyle Gets or sets the styles to be applied to each fixed top item.
Font (inherited from WebControl) 
FooterStyle Gets or sets the style to be applied to the entire footer area.
ForceSSL (inherited from WebControl) Gets or sets a value indicating whether the server should work as if it were always running on a secure server (https).
ForeColor (inherited from WebControl) 
FullRowMode Gets or sets whether selection and editing is row based or cell based.
GoToBoxStyle Gets or sets the style to be applied to the text box where user can enter a target page number directly.
GoToBoxVisible Gets or sets a value indicating whether to display a text box with which user can enter a target page number directly.
GoToButtonText Gets or sets the text for the button displayed right to the textbox where user can directly enter a target page number.
GoToLabelText Gets or sets the text to be displayed left to the textbox where user can directly enter a target page number.
GridLineColor Gets or sets the color of the grid lines.
GridLines Gets or sets how grid lines are displayed.
HasAttributes (inherited from WebControl) 
HasChildViewState (inherited from Control) 
Height (inherited from WebControl) 
ID (inherited from Control) 
IdSeparator (inherited from Control) 
ImageBaseDirectory (inherited from WebControl) Gets or sets the folder that contains images for the control.
IsCallbackByMe Returns a value indicating whether the current request is generated by the Grid in Callback running mode to update grid data.
IsChildControlStateCleared (inherited from Control) 
IsEnabled (inherited from WebControl) 
IsTrackingViewState (inherited from Control) 
IsViewStateEnabled (inherited from Control) 
ItemHeight Gets or sets the height of the item.
Items Gets a collection of GridItem objects that represents the individual items in the grid.
ItemStyles Gets a collection of GridItemStyleSet objects that specify grid item styles.
KeyField Gets or sets the key field of the data source.
LastPageButtonHtml Gets or sets the HTML for the pager button that would navigate to the last page.
LoadingHTML Gets or sets the HTML to be displayed while the Grid load/reload data in Callback mode.
LoadViewStateByID (inherited from Control) 
NamingContainer (inherited from Control) 
NewItemIndicatorHtml Gets or sets the HTML for the new item indicator.
NextPageButtonHtml Gets or sets the HTML for the pager button that would navigate to the next page.
PageButtonFormat Gets or sets the format string used to create the HTML text for pager buttons that would navigate to each individual page.
PagerLabelTemplate Gets or sets the pager label template.
PagerSize Gets or sets the number of page buttons the pager displays.
PageSize Gets or sets the number of items displayed per page.
Parent (inherited from Control) 
PrevPageButtonHtml Gets or sets the HTML for the pager button that would navigate to the previous page.
RecordCount Gets or sets the total number of records.
RecordOffset Gets the index of the first displayed record.
RenderingCompatibility (inherited from Control) 
RightToLeft (inherited from WebControl) Gets or sets a value indicating whether the control should renders as right to left.
RunningMode Gets or sets the running mode of the grid.
ScrollBars Gets or sets the type of scroll bars to be displayed.
SelectedCellIndex Gets or sets the selected cell index.
SelectedItemIndex Gets or sets the selected item index.
Shortcut (inherited from WebControl) Get a Shortcut object through which you can get or set the keyboard short cut for this control.
Site (inherited from Control) 
SkinID (inherited from WebControl) 
SortColumn Gets the column that the Grid is currently being sorted on.
Style (inherited from WebControl) 
StyleSetIDField Gets or sets the field from which GridItem populates its StyleSetID field.
SupportsDisabledAttribute (inherited from WebControl) 
TabIndex (inherited from WebControl) 
TagKey (inherited from WebControl) 
TagName (inherited from WebControl) 
TemplateControl (inherited from Control) 
TemplateSourceDirectory (inherited from Control) 
ToolTip (inherited from WebControl) 
TotalPages Gets the total number of pages.
UniqueID (inherited from Control) 
ValidateRequestMode (inherited from Control) 
ViewState (inherited from Control) 
ViewStateIgnoresCase (inherited from Control) 
ViewStateMode (inherited from Control) 
Visible (inherited from Control) 
Width (inherited from WebControl) 
See Also