Back to Devexpress

CustomColumnDataEventArgs.Row Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-customcolumndataeventargs-df392b9b.md

latest5.8 KB
Original Source

CustomColumnDataEventArgs.Row Property

Gets the currently processed row.

Namespace : DevExpress.XtraGrid.Views.Base

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
public object Row { get; }
vb
Public ReadOnly Property Row As Object

Property Value

TypeDescription
Object

An object that is the currently processed row.

|

Remarks

The Row property returns an object that is a row in a View’s underlying data source. For instance, if a View’s data source is a DataView object, rows will be DataRowView objects.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Row 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-create-populate-unbound-column/CS/WindowsApplication1/Form1.cs#L48

csharp
if (e.IsGetData)
    e.Value = _Cache.GetValue(e.Row);
if (e.IsSetData)

winforms-grid-display-pictures-from-field-with-image-paths/CS/Form1.cs#L232

csharp
string colorName = (string)((DataRowView)e.Row)["Color"];
string fileName = GetFileName(colorName).ToLower();

winforms-charts-show-chart-legend-with-markers-in-separate-control/CS/Form1.cs#L85

csharp
{
    e.Value = legendMarkersTable[((Series)e.Row)];
}

winforms-grid-tokenedit-in-unbound-column/CS/Form1.cs#L63

csharp
void OnGridViewCustomUnboundColumnData(object sender, CustomColumnDataEventArgs e) {
    Task task = e.Row as Task;
    if(task == null)

winforms-app-ui-automation-testing/CS/UIAutomationTestingExample/CustomersForm.cs#L29

csharp
return;
Customer customer = e.Row as Customer;
if (customer != null && modifiedItems.Contains(customer)) {

winforms-grid-create-populate-unbound-column/VB/WindowsApplication1/Form1.vb#L45

vb
Private Sub gridView1_CustomUnboundColumnData(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Base.CustomColumnDataEventArgs)
    If e.IsGetData Then e.Value = _Cache.GetValue(e.Row)
    If e.IsSetData Then _Cache.SetValue(e.Row, e.Value)

winforms-grid-display-pictures-from-field-with-image-paths/VB/Form1.vb#L220

vb
Dim view As GridView = TryCast(sender, GridView)
Dim colorName As String = CStr(CType(e.Row, DataRowView)("Color"))
Dim fileName As String = GetFileName(colorName).ToLower()

winforms-charts-show-chart-legend-with-markers-in-separate-control/VB/Form1.vb#L78

vb
If e.IsGetData AndAlso e.Column Is colImage Then
    e.Value = legendMarkersTable(CType(e.Row, Series))
End If

winforms-grid-tokenedit-in-unbound-column/VB/Form1.vb#L60

vb
Private Sub OnGridViewCustomUnboundColumnData(ByVal sender As Object, ByVal e As CustomColumnDataEventArgs)
    Dim task As Task = TryCast(e.Row, Task)
    If task Is Nothing Then Return

winforms-app-ui-automation-testing/VB/UIAutomationTestingExample/CustomersForm.vb#L26

vb
If Not Equals(e.Column.FieldName, "IsModified") Then Return
Dim customer As Customer = TryCast(e.Row, Customer)
If customer IsNot Nothing AndAlso modifiedItems.Contains(customer) Then

See Also

CustomColumnDataEventArgs Class

CustomColumnDataEventArgs Members

DevExpress.XtraGrid.Views.Base Namespace