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

[Solved] Grid Hirarchy only select one row

1 Answer 217 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 24 Feb 2015, 07:50 AM
Hi

It seems it is not the default that only one row at a time is selected.

Try to select "Nancy" and then any row below her in the demo http://demos.telerik.com/kendo-ui/grid/hierarchy. Both "Nancy" and any row below her will be simultaneously selected.

I only want to be able to select one row at a time (this works on a level basis but not generally).

I am trying to accomplish this using grid.clearselection() however this function does not clear rows that are not on the "top" level?!


http://dojo.telerik.com/odIKu

Many thanks

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 26 Feb 2015, 06:36 AM
Hello Markus,

Hierarchy uses separate Grid instances and that's why the selection in them works independently.

You can use the clearSelection method to remove selected rows from other Grid instances, however, you need to take the following into consideration:

1) you should not enter an endless loop, which is the current case
2) in the delesect function, you should locate all existing Grid elements (e.g. .k-grid) and their instances, except the one that fires the change event, and not just the master Grid (#grid)

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Markus
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or