Skip to main content

DataGridView.GetCellDisplayText(Int32, String) Method

Gets the text displayed within the specified cell.

Namespace: DevExpress.XamarinForms.DataGrid

Assembly: DevExpress.XamarinForms.Grid.dll

NuGet Package: DevExpress.XamarinForms.Grid

Declaration

public string GetCellDisplayText(
    int rowHandle,
    string fieldName
)

Parameters

Name Type Description
rowHandle Int32

The handle of the row that contains the cell.

fieldName String

The field name of the column that contains 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 a column with the specified field name.
See Also