Skip to main content

DataGridView.GetCellDisplayText(Int32, GridColumn) Method

Gets the text displayed within the specified cell.

Namespace: DevExpress.Maui.DataGrid

Assembly: DevExpress.Maui.DataGrid.dll

NuGet Package: DevExpress.Maui.DataGrid

Declaration

public string GetCellDisplayText(
    int rowHandle,
    GridColumn column
)

Parameters

Name Type Description
rowHandle Int32

The handle of the row that contains the cell.

column GridColumn

A GridColumn class descendant that specifies the column containing the cell.

Returns

Type Description
String

A string displayed within the specified cell.

Remarks

Use the GetCellDisplayText method to obtain a textual representation of the specified cell value. The returned string is formatted as specified by the GridColumn.DisplayFormat property of the column to which the specified cell belongs. If you need to obtain the actual cell value, use the DataGridView.GetCellValue method instead.

The GetCellDisplayText method returns an empty string in the following cases:

  • the specified row handle does not point to any of the rows within the grid or points to a group row;
  • the grid does not contain the specified column.
See Also