aspnet-devexpress-dot-web-dot-aspxgridcolumndataeventargs-36276289.md
Gets the current data item’s (row, card or record) index in the data source.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public int ListSourceRowIndex { get; }
Public ReadOnly Property ListSourceRowIndex As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value that specifies the data item’s index in the data source.
|
The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.
asp-net-web-forms-grid-editable-unbound-columns/CS/UnboundColumnForCommenting/Default.aspx.cs#L40
if(e.IsGetData && e.Column.FieldName == "Comment") {
object key = e.GetListSourceFieldValue(e.ListSourceRowIndex, ASPxGridView1.KeyFieldName);
e.Value = MyComments.GetComment(key);
asp-net-web-forms-grid-editable-unbound-columns/VB/UnboundColumnForCommenting/Default.aspx.vb#L37
If e.IsGetData AndAlso Equals(e.Column.FieldName, "Comment") Then
Dim key As Object = e.GetListSourceFieldValue(e.ListSourceRowIndex, ASPxGridView1.KeyFieldName)
e.Value = GetComment(key)
See Also
ASPxGridColumnDataEventArgs Class