I've used this code to toggle a grid's expand-collapse state, but since installing the recent 2013 Q3 update the grid expands ok but then remains expanded when the expand/collapse command is triggered again. How do I collapse an expanded grid now?
The requested functionality of Expand/CollapseAll is in-built from the 2013 Q2 release version of RadControls. Set the EnableHierarchyExpandAll="true" property for the Radgrid. Please check this demo on Grid - Expand All for Hierarchy.
Thank you. I added e.Cancel = true to my code now that you explained the Telerik code now processes that command automatically. I did not see that listed under breaking changes in the 2013 Q3 release notes, which would have been helpful.
I kept my own code because I include both an expand/collapse icon and a text link in the grid's command item. I don't think the icon alone would be clear to all of my users. Is there a way to include both the icon and either text or at least a tooltip to make the meaning clear to users if I use the new automatic capability?
answered on 12 Nov 2013, 08:30 AM
You could add a text and tooltip by using the following approach.
Button button = header["ExpandColumn"].Controls as Button;
button.ToolTip = "Expand all items";
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.