Cells Overview

  • 2 minutes to read

ASPxGridView displays three types of cells: data, edit and command. These cell types are described in this document.

Data Cells

ASPxGridView displays data using data columns and rows. Each data row displays data cells. Each data cell value corresponds to a field value within a record.

veDataCell

Data cells are at the intersection of data column and data rows. To identify a cell when obtaining its value, you need to know its owning row and column. A data row is identified by its visible position (index) within ASPxGridView. A data column is identified by its ID, caption or the name of the data source field to which it is bound.

The following sample code obtains the department displayed within the first visible row and its budget.

object cellValues = ASPxGridView1.GetRowValues(0, new string[] {"Department", "Budget"});

The appearance settings used to paint data cells can be accessed and customized via the GridViewStyles.Cell property. These style settings are common to all data cells. Columns provide their own style settings used to paint their data cells (GridViewColumn.CellStyle). This allows you to provide custom style for data cells that reside within individual columns.

Edit Cells

Edit cells are displayed within the Edit Form when ASPxGridView is in an edit mode. They correspond to data columns and allow their values within the edited row to be changed.

cdEditCells

An edit cell displays the name of the column to which it corresponds, as well as the editor that is used to edit column values. The editor displayed within the edit cell is specified by the column's GridViewDataColumn.PropertiesEdit property.

The style settings used to paint edit cells can be accessed via the GridViewStyles.EditFormCell property. Data columns provide the GridViewDataColumn.EditCellStyle property, which allows their edit cells to be painted using custom style settings.

Command Cells

ASPxGridView provides command columns that allow end-users to manipulate its data (switch the grid view to edit mode, update data, select and deselect rows, etc.). Command columns display command cells. A command cell displays command items.

cdCommandCells