windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-customcolumndisplaytexteventargs.md
Gets or sets the display text for the cell currently being processed.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public string DisplayText { get; set; }
Public Property DisplayText As String
| Type | Description |
|---|---|
| String |
A string representing the cell’s current display text.
|
Initially the DisplayText property contains the text currently displayed in the cell. To provide custom text for the cell, assign it to this property.
The cell’s edit value can be obtained via the CustomColumnDisplayTextEventArgs.Value property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the DisplayText property.
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.
winforms-grid-richedit-highlight-search-results/CS/E4422/Form1.cs#L25
if (e.Column == colDescription && !string.IsNullOrEmpty(gridView1.FindFilterText)) {
server.RtfText = e.DisplayText;
e.DisplayText = server.Text;
winforms-dashboard-custom-items/CS/TutorialsCustomItems/CustomItems/SimpleTableItem.cs#L61
DashboardFlatDataSource data = (DashboardFlatDataSource)grid.DataSource;
e.DisplayText = data.GetDisplayText(e.Column.FieldName, e.ListSourceRowIndex);
}
winforms-dashboard-trend-line-indicators/CS/WinformsIndicator/Program.cs#L59
DashboardFlatDataSource data = (DashboardFlatDataSource)grid.DataSource;
e.DisplayText = data.GetDisplayText(e.Column.FieldName, e.ListSourceRowIndex);
}
winforms-grid-richedit-highlight-search-results/VB/E4422/Form1.vb#L24
If e.Column Is colDescription AndAlso Not String.IsNullOrEmpty(gridView1.FindFilterText) Then
server.RtfText = e.DisplayText
e.DisplayText = server.Text
winforms-dashboard-custom-items/VB/TutorialsCustomItems/CustomItems/SimpleTableItem.vb#L62
Dim data As DashboardFlatDataSource = DirectCast(grid.DataSource, DashboardFlatDataSource)
e.DisplayText = data.GetDisplayText(e.Column.FieldName, e.ListSourceRowIndex)
End Sub
winforms-dashboard-trend-line-indicators/VB/WinformsIndicator/Program.vb#L67
Dim data As DashboardFlatDataSource = CType(grid.DataSource, DashboardFlatDataSource)
e.DisplayText = data.GetDisplayText(e.Column.FieldName, e.ListSourceRowIndex)
End Sub
See Also
CustomColumnDisplayTextEventArgs Class