Virtualgrid clear selection

1 Answer 27 Views
VirtualGrid
Emanuele
Top achievements
Rank 1
Iron
Emanuele asked on 29 Jul 2024, 12:19 PM

Hi,

is there a way to clear the selection completely in a VirtualGrid?

I have a simple VirtualGrid with SelectionMode=FullRowSelect and MultiSelect=true. When I use the ClearSelection method the arrow in the row header is still visible and also the last clicked cell (see the attached video in the zip file).

Thank you very much.

 

Emanuele

1 Answer, 1 is accepted

Sort by
0
Accepted
Nadya | Tech Support Engineer
Telerik team
answered on 30 Jul 2024, 01:43 PM

Hello, Emanuele,

Thank you for writing.

The ClearSelction method clears all regions when the MultiSelect is enabled. If you want to remove all selected rows you need to set the CurrentCell property to null:

private void btnClearSelection_Click(object sender, EventArgs e)
{
    gvItems.Selection.ClearSelection();
    gvItems.CurrentCell = null;
}

I hope this helps. If you have any other questions, please let me know. 

Regards,
Nadya | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Emanuele
Top achievements
Rank 1
Iron
commented on 30 Jul 2024, 01:57 PM

Thank you very much Nadya, it works!

 

Emanuele

Tags
VirtualGrid
Asked by
Emanuele
Top achievements
Rank 1
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or