Grid hierarchy - custom command with same name fires the script multiple times

1 Answer 29 Views
Grid
ashutosh
Top achievements
Rank 1
Iron
Veteran
ashutosh asked on 17 Feb 2023, 12:32 PM

Hi,

in the hierarchical grid, if parent and child both grids have a custom command with same text, and if we click on the custom command on the child it executes the script twice.

 

https://dojo.telerik.com/eTAJIkuw

 

it works if we change the text of one of the custom command, but it wont be always so simple and easy to change the text, so can you suggest me a fix for this?

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 22 Feb 2023, 09:38 AM

Hello Ashutosh,

This happens because the custom command buttons have the same name. The Grid uses the button name in order to attach its click handler, so the parent Grid button click listener matches the buttons within the detail Grids, too. The fix for this is to make the names different.

Regards,
Nikolay
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
ashutosh
Top achievements
Rank 1
Iron
Veteran
Answers by
Nikolay
Telerik team
Share this question
or