This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.
GridControl displays data using columns and rows. These elements correspond to bound data source fields and records respectively. Each row displays data cells arranged in a column layout. In other words, data cells are located at the intersection of rows and columns. Each data cell corresponds to a field value within a record in a data source. Cells are used to display and edit data.
The grid provides a set of methods allowing you to obtain and modify its cell values, regardless of whether end-users are allowed to edit data. The required cell is identified by specifying its owning row and column. The row is specified by its handle. The column can be specified by its name or field name. For detailed information on how to obtain row handles and identify columns, see Identify and Access Rows and Identify and Access Columns.
Get Cell Values
GridControl provides the following methods for obtaining cell values.
Returns the text displayed within the specified cell.
It is also possible to get cell values using the functionality provided by the grid's data source. To do this, call the GridControl.GetRow method. It returns an IRowData object providing access to a grid's row data. Then you can use this object's IRowData.GetFieldValue method to get values of the specified fields within the processed row, or use the IRowData.DataObject property to access an object representing a data source's record and then call its methods to retrieve field values.
We are updating the DevExpress product documentation website and this page is part of our new experience. During this transition period, product documentation remains available in our previous format at documentation.devexpress.com. Learn More...
Was this page helpful?
Thanks for your feedback! Any other suggestions? Tell us here.