Sdílet prostřednictvím


DataGrid.SelectedIndex Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the index of the current selection.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)

Syntax

'Declaration
Public Property SelectedIndex As Integer
public int SelectedIndex { get; set; }
<sdk:DataGrid SelectedIndex="int"/>

Property Value

Type: System.Int32
The index of the current selection, or -1 if the selection is empty.

Remarks

Dependency property identifier field: SelectedIndexProperty

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Other Resources