DxDataGrid<T>.MultipleSelectedDataRows Property

Specifies the selected data rows.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
public IEnumerable<T> MultipleSelectedDataRows { get; set; }

Property Value

Type Description
IEnumerable<T>

Data rows.

Remarks

Use the MultipleSelectedDataRows property to specify the selected data rows.

Data Grid - Multiple selection

<DxDataGrid Data="@DataSource"
    SelectionMode="DataGridSelectionMode.MultipleSelectedDataRows"
    @bind-MultipleSelectedDataRows="@SelectedProducts">
    ...
</DxDataGrid>

@code {
    IEnumerable<Product> DataSource;
    IEnumerable<Product> selectedProducts;

    IEnumerable<Product> SelectedProducts {
        get { return selectedProducts; }
        set {
            selectedProducts = value;
            ...
        }
    }

    protected override void OnInitialized() {
        ...
        SelectedProducts = DataSource.Take(2);
    }
}
NOTE

Set the SelectionMode property to MultipleSelectedDataRows to allow users to select multiple rows in the grid.

Online Demo

Data Grid - Multiple Data Rows Selection

See Also