Skip to main content

DataControlBase.SelectedItems Property

Gets or sets a list of data objects that correspond to rows/nodes selected within a View.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v23.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public IList SelectedItems { get; set; }

Property Value

Type Description
IList

A list of data objects that correspond to rows/nodes selected within a View.

Remarks

Refer to the Binding to a Collection of Selected Items topic for more information.

Example

The following code sample binds the ListBoxEdit to the SelectedItems collection to show the GridControl‘s selected rows in the ListBox:

<dxg:GridControl x:Name="grid" SelectionMode="Row" ... />
<GroupBox Header="Selected Records">
    <dxe:ListBoxEdit ItemsSource="{Binding SelectedItems, ElementName=grid}"
                     DisplayMember="Name"/>
</GroupBox>

The following code snippets (auto-collected from DevExpress Examples) contain references to the SelectedItems 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.

See Also