I have a basic HierarchyChildTemplate grid with parent and hild relation ship defined and the grid works fine. One of the requirements it to add a plus button in the header for the first column when clicked by the user it has to expand all the rows with row details and collpase when clicked again just like it would behave for each row.
I was able to add a button and expand the rows details successfully but I need the button to show up in the row header.
Any help in this regards is appreciated
Thank you
I was able to add a button and expand the rows details successfully but I need the button to show up in the row header.
Any help in this regards is appreciated
Thank you
4 Answers, 1 is accepted
0
Dinesh
Top achievements
Rank 1
answered on 15 Mar 2019, 04:49 AM
Expand & Collapse Row Details in HierarchyChildTemplate
My requirement all row using a single button is exapand and collapse,
every time user expand the (+) button for all the grid, but user wants some extra button for expanding all the Hierarchial grids like this image....
My requirement all row using a single button is exapand and collapse,
every time user expand the (+) button for all the grid, but user wants some extra button for expanding all the Hierarchial grids like this image....
0
Dinesh
Top achievements
Rank 1
answered on 15 Mar 2019, 04:51 AM
Anyone Give this requirement Answer ,..Specifically Telerik Admin
0
Dinesh
Top achievements
Rank 1
answered on 15 Mar 2019, 04:52 AM
Anyone Tell the this Requirement Answer specifically Telerik Admin
0
Hello Dinesh,
The desired result can be achieved by adding a GridViewToggleButton to the PART_HierarchyIndentPresenter element of the GridViewHeaderRow template. Please have a look at the following article for details on how to extract and modify the control template of a control.
You can then handle the Checked and Unchecked events of the button, possibly by defining an attached behavior for it and call the ExpandAllHierarchyItems and CollapseAllHierarchyItems methods respectively.
For your convenience, I've also attached a sample project demonstrating this approach.
Please have a look and let me know whether a similar approach would be applicable at your end.
Regards,
Dilyan Traykov
Progress Telerik
The desired result can be achieved by adding a GridViewToggleButton to the PART_HierarchyIndentPresenter element of the GridViewHeaderRow template. Please have a look at the following article for details on how to extract and modify the control template of a control.
You can then handle the Checked and Unchecked events of the button, possibly by defining an attached behavior for it and call the ExpandAllHierarchyItems and CollapseAllHierarchyItems methods respectively.
For your convenience, I've also attached a sample project demonstrating this approach.
Please have a look and let me know whether a similar approach would be applicable at your end.
Regards,
Dilyan Traykov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.