Skip to main content

Cells Overview

  • 2 minutes to read

ASPxGridView displays three types of cells:

  • Data cells
  • Edit cells
  • Command cells

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

A data cell is the intersection of a data column and a data row. To identify a cell when you obtain 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 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"});

You can use the GridViewStyles.Cell property to access the appearance settings used to paint data cells. These style settings are common to all data cells. Columns have their own style settings used to paint their data cells (GridViewColumn.CellStyle). This allows you to apply a custom style to data cells that reside within a column.

Edit Cells

Edit cells are displayed within the Edit Form when ASPxGridView is in edit mode. When a user edits a row, editors are displayed for column fields that correspond to that row (see the image below).

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 column’s GridViewDataColumn.PropertiesEdit property specifies the editor displayed within the edit cell.

You can use the GridViewStyles.EditFormCell property to access style settings used to paint edit cells. A column’s GridViewDataColumn.EditCellStyle property allows you to customize the column’s edit cells.

Command Cells

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

cdCommandCells