Skip to main content
A newer version of this page is available. .

DataControlBase.SelectedItem Property

Get or sets the currently focused data row (if row multi-selection is disabled); or the first selected row (if row multi-selection is enabled).

Namespace: DevExpress.Xpf.Grid

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

Declaration

public object SelectedItem { get; set; }

Property Value

Type Description
Object

A Object specifying the focused row.

Remarks

When record multi-selection is disabled, both the SelectedItem and DataControlBase.CurrentItem properties refer to the focused record.

When multi-selection mode is enabled, the DataControlBase.CurrentItem property refers to the last selected object (focused record), while the SelectedItem property refers to the first selected object (the first item in the DataControlBase.SelectedItems collection).

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