Xceed DataGrid for WPF v7.2 Documentation
SelectedItemsSource Property


Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace > DataGridControl Class : SelectedItemsSource Property
Gets or sets a collection of the data items that are currently selected in the grid.
Syntax
'Declaration
 
Public Property SelectedItemsSource As IList
'Usage
 
Dim instance As DataGridControl

Dim value As IList

 

instance.SelectedItemsSource = value

 

value = instance.SelectedItemsSource
public IList SelectedItemsSource {get; set;}

Property Value

A reference to a collection containing the data items currently selected in the grid. By default, a null reference (Nothing in Visual Basic).
Remarks

When this collection is provided, it and the SelectedItems collection will be synchronized at all times (in both directions). This allows the user to modify the list of selected items, or be notified of any change done in the selected items.

The collection must implement the IList interface, and must implement a notification interface, either INotifyCollectionChanged (recommended), or IBindingList. An example of such a collection is ObservableCollection<T> A code example can be found in the MVVM sample.

Note: for the SelectedItems at the details level, we must use the DetailsExpanding event. See the DetailsExpansionChangingeventArgsSelectedItemsSources property.

Requirements

Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataGridControl Class
DataGridControl Members