This is a migrated thread and some comments may be shown as answers.

Discrading previously selected rows on grid.select()

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
deepa
Top achievements
Rank 1
deepa asked on 12 May 2016, 01:07 PM

If a do a grid.select(row1), and then do a grid.select(row2), I mean to switch the selection from row1 to row2. But this doesn't happen; both rows are selected. To achieve the switching, I need to do a grid.clearSelection() before selecting again, but that fires the change event 2 times.

How can i select one row at a time programatically? By manually clicking on rows, the selection switches, and change event is only fired once. So I'm thinking there has to be a way to reproduce that programatically as well.

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 13 May 2016, 08:20 AM
Hi,

You should have AllowMultiRowSelection="false" set for the grid, otherwise the control will be able to select more than one rows and you have clear the previous selection in advance. With AllowMultiRowSelection="false" only a single row will be selected at a time.

Regards,
Marin
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
deepa
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or