New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Telerik.Web.UI.GridItem

Class that represents the rows of each GridTableView with RadGrid. All Items in RadGrid inherit from this class. RadGrid creates the items runtime, when it binds to data.

Inheritance Hierarchy

  • System.Object
  • System.Web.UI.Control
  • System.Web.UI.WebControls.WebControl
  • System.Web.UI.WebControls.TableRow
  • Telerik.Web.UI.GridTableRow
  • Telerik.Web.UI.GridItem : INamingContainer

Properties

CanExpand Boolean

Gets a value indicating whether the item can be "expanded" to show its child items

ClientID String

Gets the server control identifier generated by ASP.NET.

ConditionalExpanded Boolean

Used in HierarchyLoadMode="Conditional"

DataItem Object

The original DataItem from the DataSource. See examples section below.

DataSetIndex Int32

Gets the index of the GridDataItem in the underlying DataTable/specified table from a DataSet.

Display Boolean

Sets whether the GridItem will be visible or with style="display:none;"

Edit Boolean

Sets the Item in edit mode. Requires Telerik RadGrid to rebind.

Remarks

If is set to InPlace, the grid column editors will be displayed inline of this item.

                If  is set to EditForms, a new
                GridItem will be created, which will be child of this item
                (GridEditFormItem). The new item will hold the edit form.

Expanded Boolean

Gets or sets a value indicating whether the grid item is expanded or collapsed.

GroupIndex String

Gets the index of the Item in the group. This works only when grouping.

HasChildItems Boolean

Gets a value indicating whether this item has child items - or items somehow related to this.

IsDataBound Boolean

Gets a value indicating whether the grid item is bound to a data source.

IsInEditMode Boolean

Gets a value indicating whether the grid item is in edit mode at the moment.

ItemIndex Int32

Gets the index of the grid item among the collection. This index also can be used to get the DataKeyValues corresponding to this item from a GridTableView.

ItemIndexHierarchical Int32

Get the unique item index among all the item in the hierarchy. This index is used when setting item to selected, edited, etc

ItemType GridItemType

Gets the respective GridItemType of the grid item.

OwnerGridID String

Gets the ClientID of the RadGrid instance that owns the item.

Remarks

This would be useful if several controls use the same eventhandler and you need to diferentiate the Grid instances in the handler.

OwnerID String

Gets the ClientID of the GridTableView that owns this instance.

OwnerTableView GridTableView

Gets a reference to the GridTableView that owns this GridItem.

SelectableMode GridItemSelectableMode

Gets or sets a value determining if the chould be selected either on the client or on the server.

Selected Boolean

Gets or set a value indicating whether the grid item is selected

Methods

CalcColSpan

Calculate column-span value for a cell using column list, when the cell indicated with FromCellIndex should be spanned to ToCellIndex

Parameters

columns Telerik.Web.UI.GridColumn

columns - visible property is taken in count

FromCellIndex System.Int32

cell inbdex of spanned cell

ToCellIndex System.Int32

cell index of next not-spanned cell or -1 for the last cell index

Returns

System.Int32 ColSpan number

ExpandHierarchyToTop

Returns

System.Void

FireCommandEvent

Use this method to simulate item command event that bubbles to RadGrid and can be handeled automatically or in a custom manner, handling RadGrid.ItemCommand event.

Parameters

commandName System.String

command to bubble, for example 'Page'

commandArgument System.Object

command argument, for example 'Next'

Returns

System.Void

SetTempIndexHierarchical

Used after postback before ViewState becomes available - for example in ItemCreated and ItemDataBound events

Parameters

value System.String

Returns

System.Void