DataGrid.SelectedItems Property

Gets a list that contains the data items corresponding to the selected rows.

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

Syntax

'Declaration
Public ReadOnly Property SelectedItems As IList
public IList SelectedItems { get; }

Property Value

Type: System.Collections.IList
A list of the data items corresponding to the selected rows.

Remarks

If the SelectionMode property is set to Single, the SelectedItems list will contain only the SelectedItem property value.

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.