Back to Devexpress

SelectionChangedEventArgs.ControllerRow Property

corelibraries-devexpress-dot-data-dot-selectionchangedeventargs-cf4aa985.md

latest3.5 KB
Original Source

SelectionChangedEventArgs.ControllerRow Property

Identifies the row whose selected state has been changed.

Namespace : DevExpress.Data

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public int ControllerRow { get; }
vb
Public ReadOnly Property ControllerRow As Integer

Property Value

TypeDescription
Int32

A zero-based integer identifying the row whose selected state has been changed.

|

Remarks

For the XtraGrid control, the SelectionChangedEventArgs class provides data for the ColumnView.SelectionChanged event. The event’s ControllerRow parameter identifies the handle of the row whose selection state has been changed. In specific instances, the entire collection of selected rows needs to be refreshed (for instance, when the grid’s data is re-sorted, re-grouped or filtered). In this instance, the ColumnView.SelectionChanged event fires, and its SelectionChangedEventArgs.Action parameter is set to CollectionChangeAction.Refresh and the ControllerRow parameter contains the GridControl.InvalidRowHandle property’s value.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ControllerRow 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-select-detail-rows-when-selecting-master-row/CS/MasterDetailSelectionHelper.cs#L35

csharp
}
if (_GridView.IsMasterRow(e.ControllerRow) || e.ControllerRow == GridControl.InvalidRowHandle)
{

winforms-grid-select-detail-rows-when-selecting-master-row/VB/MasterDetailSelectionHelper.vb#L30

vb
End If
If _GridView.IsMasterRow(e.ControllerRow) OrElse e.ControllerRow = GridControl.InvalidRowHandle Then
    UpdateSelection(e.ControllerRow)

See Also

SelectionChangedEventArgs Class

SelectionChangedEventArgs Members

DevExpress.Data Namespace