wpf-devexpress-dot-xpf-dot-grid-dot-gridcolumndataeventargs-e2b287d4.md
Gets the index of the record in a data source to which the processed row corresponds.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public int ListSourceRowIndex { get; }
Public ReadOnly Property ListSourceRowIndex As Integer
| Type | Description |
|---|---|
| Int32 |
A zero-based integer value that specifies the index of the record in a data source to which the processed row corresponds.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the ListSourceRowIndex 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.
wpf-data-grid-change-background-color-for-modified-cells/CS/HighlightChangedCellBehavior.cs#L52
if (IsServiceColumn(e.Column)) {
var key = Tuple.Create(AssociatedObject.GetRowByListIndex(e.ListSourceRowIndex), e.Column.FieldName);
if (e.IsGetData) {
if (itemsSource == null) return;
var row = Rows[e.ListSourceRowIndex];
var item = itemsSource[Convert.ToInt32(e.Column.FieldName)];
if(e.IsGetData) {
MyObject row = dataSource[e.ListSourceRowIndex];
string resourceName = GetResourceName(row.Action);
wpf-data-grid-change-background-color-for-modified-cells/VB/HighlightChangedCellBehavior.vb#L74
If HighlightModifiedCells.ChangedCellsHighlightBehavior.IsServiceColumn(e.Column) Then
Dim key = System.Tuple.Create(Me.AssociatedObject.GetRowByListIndex(e.ListSourceRowIndex), e.Column.FieldName)
If e.IsGetData Then
End If
Dim row = Rows(e.ListSourceRowIndex)
Dim item = itemsSource_Renamed(Convert.ToInt32(e.Column.FieldName))
If e.IsGetData Then
Dim row As MyObject = dataSource(e.ListSourceRowIndex)
Dim resourceName As String = GetResourceName(row.Action)
See Also