SelectedIndex Property
See Also 
Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace > DataGridControl Class : SelectedIndex Property

Gets or sets the index of the currently selected data item.

Syntax

Visual Basic (Declaration) 
Public Property SelectedIndex As Integer
C# 
public int SelectedIndex {get; set;}

Return Value

The index of the currently selected data item. If no data item is selected, -1. By default, -1.

Remarks

The SelectedItems, SelectedItem, and SelectedIndex properties represent data items and not DataRows.

In the case where more than 1 data item is selected in a grid, the SelectedItem property will return the first data item in the SelectedItems collection and the SelectedIndex property will return the index of this same item.

Requirements

Supported Frameworks: Microsoft .NET Framework version 3.5

See Also