ColumnView.GetListSourceRowCellValue(Int32, String) Method
Returns the value of the specified cell, which is identified by a field name and the index of a record in the data source.
Namespace: DevExpress.XtraGrid.Views.Base
Assembly: DevExpress.XtraGrid.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
listSourceRowIndex | Int32 | An integer value representing the index of the record in the underlying data source. Row handles are not data source indexes, see the Accessing Rows in Code. Row Handles section of the “Rows” article for more information. |
fieldName | String | A string representing the field name. |
Returns
Type | Description |
---|---|
Object | An object representing the required cell’s value. |
Remarks
This method takes the index of a record in the data source as a parameter. Typically, you use this method to get row values while handling specific events (ColumnView.CustomUnboundColumnData and ColumnView.CustomColumnSort). These events provide ListSourceRowIndex parameters, which identify currently processed rows. Use these parameters to identify rows while calling the GetListSourceRowCellValue method.
To get row values based on indexes or rows in the grid control, use the ColumnView.GetRowCellValue method.
Note
Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the GetListSourceRowCellValue member must not be invoked for these Views. The GetListSourceRowCellValue member can only be used with Views that display real data within the Grid Control. Use the following methods to access these Views with which an end user interacts at runtime.
- GridControl.MainView - returns the top most View in a grid;
- GridControl.FocusedView - returns the focused View;
- GridControl.DefaultView - returns the currently maximized View;
- the sender parameter of View specific events;
- GridView.GetDetailView - returns a detail clone View for a specific master row.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetListSourceRowCellValue(Int32, String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.