# Datagrid in multi-select mode

**URL:** <https://forum.radzen.com/t/datagrid-in-multi-select-mode/9716>\
**Category:** Blazor WebAssembly\
**Created:** [December 22, 2021, 3:32pm UTC](https://forum.radzen.com/t/datagrid-in-multi-select-mode/9716 "2021-12-22T15:32:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcasement](https://forum.radzen.com/letter_avatar_proxy/v4/letter/j/6bbea6/32.png) [@jcasement](https://forum.radzen.com/u/jcasement)\
**Post date:** [December 22, 2021, 3:32pm UTC](https://forum.radzen.com/t/datagrid-in-multi-select-mode/9716/1 "2021-12-22T15:32:47Z")

</div>

When using the multi-Select mode of the grid and trying to deselect programitcally (selectedServices = null;) all rows, it removes the check mark in the rows but leaves one of the previously selected rows highlighted, as if it was selected. I can't seem to un-highlight all the rows of the grid. I've tried the grid.Reload() but the highlight remains. Even if I sort the grid from the UI it retains the one highlighted row.  
Is there a way to deselect all rows programactically and remove all check marks and highlighting?

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [December 23, 2021, 9:32am UTC](https://forum.radzen.com/t/datagrid-in-multi-select-mode/9716/2 "2021-12-23T09:32:33Z")

</div>

I'm unable to reproduce this on our demo:

> **[Blazor DataGrid - Multi Selection | Free UI Components by Radzen](https://blazor.radzen.com/datagrid-multiple-selection)**
>
> This example demonstrates how to enable multiple selection in Blazor RadzenDataGrid component.

---

<div class="post-metadata">

**Author:** ![pshukl23\_uhg](https://forum.radzen.com/user_avatar/forum.radzen.com/pshukl23_uhg/32/17874_2.png) [@pshukl23\_uhg](https://forum.radzen.com/u/pshukl23_uhg)\
**Post date:** [May 29, 2024, 11:21am UTC](https://forum.radzen.com/t/datagrid-in-multi-select-mode/9716/3 "2024-05-29T11:21:53Z")

</div>

For multi select datagrid working with this code  
  
  
\<RadzenCheckBox TabIndex="-1" TriState="false" TValue="bool?"  
InputAttributes="@(new Dictionary\<string, object\>() { { "aria-label", "Select all items" } })"  
Value="@(selectedItems == null || selectedItems?.Any() != true ? false : !NewRequestList.All(i =\> selectedItems.Any(x=\>x.ProjectTitle.Contains(i.ProjectTitle))) ? null : NewRequestList.Any(i =\> selectedItems.Any(x=\>x.ProjectTitle.Contains(i.ProjectTitle))))"  
Change="@(args =\> { selectedItems = args == true ? NewRequestList.ToList() : null; })" /\>  
  
  
\<RadzenCheckBox TabIndex="-1" TriState="false" TValue="bool"  
InputAttributes="@(new Dictionary\<string, object\>() { { "aria-label", "Select item" } })"  
Value="@(selectedItems != null && selectedItems.Any(x=\>x.ProjectTitle.Contains(list1.ProjectTitle)))"  
Change=@(args =\> { if (false) { Grid.SelectRow(list1); } if (selectedItems != null) { if (selectedItems.Count() \>= NewRequestList.Count()) { selectedItems = null; } } }) /\>
