GridControl.AllowRestoreSelectionAndFocusedRow Property

Gets or sets whether to preserve the focused row and selection after sorting, grouping or filtering.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DefaultValue(DefaultBoolean.Default)]
[Browsable(true)]
[DXCategory("Data")]
public DefaultBoolean AllowRestoreSelectionAndFocusedRow { get; set; }
<DefaultValue(DefaultBoolean.Default)>
<Browsable(True)>
<DXCategory("Data")>
Public Property AllowRestoreSelectionAndFocusedRow As DefaultBoolean

Property Value

Type Default Description
DefaultBoolean

Default

A DefaultBoolean enumeration value that specifies whether the focused row and selection are restored after sorting, grouping or filtering.

Remarks

By default, in Large Data Sources: Server and Instant Feedback Modes, a focused row is not restored after sorting or filtering. This allows you to significantly improve application performance by avoiding additional requests to the server. However, if you need to preserve a focused row, set the AllowRestoreSelectionAndFocusedRow property to true.

If the grid doesn't operate in server mode, a focused row and selection are automatically restored after sorting, grouping or filtering (by default). To disable this functionality, turn off the AllowRestoreSelectionAndFocusedRow option.

When grouping by a column so that this column becomes the first grouping column (or the single grouping column), the focused row is not restored, regardless of the AllowRestoreSelectionAndFocusedRow option. Focus is always moved to the first visible row. The same applies when completely ungrouping data (when no grouping column is left).

When a selected row becomes hidden (e.g., as a result of a data filtering operation), this row is deselected, and its selection status will not be automatically restored.

See Also