Back to Devexpress

CustomColumnDisplayTextEventArgs.Column Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-customcolumndisplaytexteventargs-56f73705.md

latest3.3 KB
Original Source

CustomColumnDisplayTextEventArgs.Column Property

Gets the column that contains the cell currently being processed.

Namespace : DevExpress.XtraGrid.Views.Base

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
public GridColumn Column { get; }
vb
Public ReadOnly Property Column As GridColumn

Property Value

TypeDescription
GridColumn

A GridColumn object that represents the column which contains the cell currently being processed.

|

Remarks

Use the Column property to identify the column that contains the cell currently being processed. To refer to the cell’s row use the CustomColumnDisplayTextEventArgs.ListSourceRowIndex property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Column 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#L24

csharp
private void OnCustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) {
    if (e.Column == colDescription && !string.IsNullOrEmpty(gridView1.FindFilterText)) {
        server.RtfText = e.DisplayText;

winforms-grid-richedit-highlight-search-results/VB/E4422/Form1.vb#L23

vb
Private Sub OnCustomColumnDisplayText(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs)
    If e.Column Is colDescription AndAlso Not String.IsNullOrEmpty(gridView1.FindFilterText) Then
        server.RtfText = e.DisplayText

See Also

CustomColumnDisplayTextEventArgs Class

CustomColumnDisplayTextEventArgs Members

DevExpress.XtraGrid.Views.Base Namespace