SelectedAll reacords data grid

Hi ,
I am trying to add the functionality for multiselected rows in data grid. I can select one by one and delete at the end , but the checkbox at the header does not select all the rows at once . I have followed up the Multiselected component in documentation but still does not work . Can someone help me out ?

Multiple selection is demonstrated on this demo:
https://blazor.radzen.com/datagrid-multiple-selection

Check the header CheckBox Change code.

This is the code and still does not work :

<HeaderTemplate>
                <RadzenCheckBox  Name="Checkbox1" Change="@(args => selectedItem= args ? getProcessLocationsResult.ToList() : null)" TValue="bool" Value="@((getProcessLocationsResult!=null)? getProcessLocationsResult.Any(i => selectedItem!= null && selectedItem.Contains(i)):false)">
                </RadzenCheckBox>
              </HeaderTemplate>

do you have any suggestions what is wrong ?

I don’t have anything else to share except our demo. Try to debug your code.

So this is the grid , when i click in the header all the rows select and deselected again in a second , can you check it please

<RadzenDataGrid @ref="grid0" AllowFiltering="true" AllowPaging="true" AllowSorting="true" Count="@getVAliasTargetsCount" Data="@getVAliasTargetsResult" EditMode="DataGridEditMode.Single" FilterMode="FilterMode.Advanced" TItem="DistributionList.Models.MySqlMta.VAliasTarget" PageSize="20" SelectionMode="DataGridSelectionMode.Multiple" LoadData="@Grid0LoadData" RowSelect="@Grid0RowSelect">
          <Columns>
            <RadzenDataGridColumn TItem="DistributionList.Models.MySqlMta.VAliasTarget" Property="aliases" Title="Aliases">
            </RadzenDataGridColumn>
            <RadzenDataGridColumn TItem="DistributionList.Models.MySqlMta.VAliasTarget" Property="target" Title="Target">
            </RadzenDataGridColumn>
            <RadzenDataGridColumn TItem="DistributionList.Models.MySqlMta.VAliasTarget" Filterable="false" Sortable="false" TextAlign="TextAlign.Center" Width="70px">
              <Template Context="distributionListModelsMySqlMtaVAliasTarget">
                <RadzenButton ButtonStyle="ButtonStyle.Danger" Icon="close" Size="ButtonSize.Small" Click="@((args) =>Button0Click(args, distributionListModelsMySqlMtaVAliasTarget))" @onclick:stopPropagation="true">
                </RadzenButton>
              </Template>
            </RadzenDataGridColumn>
            <RadzenDataGridColumn TItem="DistributionList.Models.MySqlMta.VAliasTarget">
              <Template Context="distributionListModelsMySqlMtaVAliasTarget">
                <RadzenCheckBox Name="Checkbox1" TValue="dynamic" Value="@(selectedRows != null && selectedRows.Contains(distributionListModelsMySqlMtaVAliasTarget))">
                </RadzenCheckBox>
              </Template>
              <HeaderTemplate>
                <RadzenCheckBox Name="Checkbox2"  TValue="bool" Value="@((getVAliasTargetsResult!=null)? getVAliasTargetsResult.Any(i => selectedRows != null && selectedRows.Contains(i)):false)" Change="@(args => selectedRows = args ? getVAliasTargetsResult.ToList() : null)">
                </RadzenCheckBox>
              </HeaderTemplate>
            </RadzenDataGridColumn>
          </Columns>
        </RadzenDataGrid>

it is urgent for me to fix it

Hey @xhuljana,

I suggest you to check our forum FAQ for reference. If you continue to demand support we will have no other option but discontinue your account.

it is related to @bind_Value in datagrid , what i can use for selectedRows in the radzendatagrid?

it is solved that issue thanks