RadGrid for ASP.NET

Data items Send comments on this topic.
See Also
Grid rows > Data items

Glossary Item Box

Rows in Telerik RadGrid are presented by the GridItem objects and its descendants. Each row in the grid represents a record from the specified DataSource. Each GridTableView has a set of rows (Items collection) of type GridItem. The collection does not provide any methods to add or remove items. However, you can control the content of an item by providing a handler for the ItemCreated event.

Please note that:

  • only items bound to the data source (normal and alternating rows) are contained in the Telerik.WebControls.RadGrid.Items collection. The header, footer, and separator are not included in the collection.
  • the ItemsHierarchy collection contains all items of the owners GridTablesView and all items of the children views.
  • the Items property of RadGrid is a reference to the ItemsHierarchy property of its MasterTableView.
 

Row Types

Generally there are two types of rows (items):

  • Static rows
  • Dynamic rows

Static Rows

These rows are always present in the grid structure regardless of whether they are visible or not. The number of these items is always known. To this group belong Header row, Footer row, CommandItem, Status bar item and Pager row (see below).

Dynamic Rows

The number of these items depends on the number of rows (records) in the Data Source and the number of groups (if the grouping is enabled). To this group belong data items, nested-view items, group-header items and edit-form items.

The number of these items (also referred to as Dynamic rows in this manual) depends on the number of rows (records) in the DataSource and the number of groups (if grouping is enabled). NestedViewItems, GroupHeaderItems and EditFormItems also belong to this group.

  • Normal Rows - these are the odd rows of the grid (see rows 1 and 3 below).  The appearance of the normal rows is controlled by the ItemStyle property.
  • Alternating Rows - these are the even rows of the grid (see rows 2 and 4 below).  The appearance of the alternating rows is controlled by the AlternatingItemStyle property.

Normal and Alternating rows

Such separation of the grid rows will help you easily customize its appearance and improve data readability.
Both ItemStyle and AlternatingItemStyle are of type GridTableItemStyle. All public properties for row customization are in the list of GridTableItemStyle members.

See Also