Skip to main content
All docs
V24.1

DashboardFlatDataSource.GetDisplayText(String, Int32) Method

Gets the cell’s display text.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v24.1.Core.dll

NuGet Package: DevExpress.Dashboard.Core

Declaration

public string GetDisplayText(
    string columnName,
    int rowIndex
)

Parameters

Name Type Description
columnName String

A column name.

rowIndex Int32

A row index.

Returns

Type Description
String

The cell’s display text.

Remarks

The GetFlatData method returns the DashboardFlatDataSource object that contains unformatted measure and dimension values. To apply formatting defined for these measures and dimensions, you can replace values with their display text. Use the GetDisplayText method to get display text for a particular measure or dimension and visualize formatted values in a custom item.

The following code snippet formats display text for the custom Grid’s cells:

custom grid with formatted values

using DevExpress.DashboardWin;
using DevExpress.XtraGrid;
using DevExpress.DashboardCommon;

namespace CustomItemsSample {
  public class CustomGridProvider : CustomControlProviderBase {
    GridView view;
    // ...
    public CustomGridProvider() {
      view = new GridView();
      grid.MainView = view;
      view.CustomColumnDisplayText += View_CustomColumnDisplayText;
    }
    void View_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) {
      DashboardFlatDataSource data = (DashboardFlatDataSource)grid.DataSource;
      e.DisplayText = data.GetDisplayText(e.Column.FieldName, e.ListSourceRowIndex);
    }
  }
}

Refer to the following tutorials for more information on how to create a custom item: Custom Item - Tutorials.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetDisplayText(String, Int32) 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.

See Also