DataGridSelection<T>.UnselectedKeysStored Property

Specifies the stored keys of the unselected data rows.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

public IEnumerable<object> UnselectedKeysStored { get; }

Property Value

Type Description
IEnumerable<Object>

The stored keys of the unselected data rows.

Remarks

In the OptimizedMultipleSelectionChanged event handler, use the UnselectedKeysStored property to get the keys of the stored unselected data rows. This property stores keys if you select all data rows.

<DxDataGrid Data="@DataSource"
    KeyFieldName="Id"
    SelectionMode="DataGridSelectionMode.OptimizedMultipleSelection"
    OptimizedMultipleSelectionChanged="OnSelectionChanged">
    ...
</DxDataGrid>

@code {
    int SelectedCount { get; set; }
    int StoredSelectedCount { get; set; }
    int StoredUnselectedCount { get; set; }

    protected void OnSelectionChanged(DataGridSelection<ProductFlat> selection) {
        StoredSelectedCount = selection.SelectedKeysStored.Count();
        StoredUnselectedCount = selection.UnselectedKeysStored.Count();
        SelectedCount = selection.SelectedKeys.Count();
    }
}

Online Demo

Data Grid - Multiple Selection with Optimized Performance

See Also