ColumnView.SetFocusedRowCellValue(GridColumn, Object) Method
Assigns a value to the specified column within the currently focused row.
Namespace: DevExpress.XtraGrid.Views.Base
Assembly: DevExpress.XtraGrid.v22.2.dll
NuGet Package: DevExpress.Win.Grid
Declaration
Parameters
Name | Type | Description |
---|---|---|
column | GridColumn | A GridColumn object representing the column in which the required cell resides. |
value | Object | An object representing the value to be assigned. |
Remarks
The SetFocusedRowCellValue method does nothing if a group row is focused.
If the specified column does not belong to the current view, this method will try to find a column within the current View whose field name matches the field name of the specified column. After the column is found its value is changed to the one specified by the value parameter. If no such column is found, this method does nothing.
The currently focused row is determined by the ColumnView.FocusedRowHandle property.
To assign a value to the focused cell, the ColumnView.SetFocusedValue method can be used. The ColumnView.SetRowCellValue method can be used to set a value within any row.
Note
Detail pattern Views do not contain data and they are never displayed within XtraGrid. So, the SetFocusedRowCellValue member must not be invoked for these Views. The SetFocusedRowCellValue 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.