May 09, 2014, 11:05 AM
[CLOSED] GridPanel with grouping and expand/collapse issue
Hi Guys,
I have a GridPanel which has grouping and also expand/collapse all functionality. Initial render of the grid is correct but I find that the expand/collapse causes the grouping headers to be rendered incorrectly. I can demonstrate this using your GridPanel -> GridPanel_Commands -> Group_Command MVC example. If you add the following code to the example Index.cshtml, you can see what I mean.
Add a top bar with the expand/collapse buttons :-
I have a GridPanel which has grouping and also expand/collapse all functionality. Initial render of the grid is correct but I find that the expand/collapse causes the grouping headers to be rendered incorrectly. I can demonstrate this using your GridPanel -> GridPanel_Commands -> Group_Command MVC example. If you add the following code to the example Index.cshtml, you can see what I mean.
Add a top bar with the expand/collapse buttons :-
.TopBar(
Html.X().Toolbar()
.Flat(true)
.Items(
Html.X().ToolbarFill(),
Html.X().Button()
.Icon(Icon.BulletPlus)
.Text("Expand All")
.Handler("this.up('gridpanel').getView().getFeature('UserCompElementsGrouping').expandAll();"),
Html.X().Button()
.Icon(Icon.BulletMinus)
.Text("Collapse All")
.Handler("this.up('gridpanel').getView().getFeature('UserCompElementsGrouping').collapseAll();"),
Html.X().ToolbarSpacer().Width(30)
)
) /* -- end of top bar items -- */
Then give the Features -> Grouping an ID as used in the handler above :- .Features(
Html.X().Grouping()
.ID("UserCompElementsGrouping")
.HideGroupedHeader(true)
.GroupHeaderTplString("{columnName}: {name} ({[values.rows.length]} {[values.rows.length > 1 ? \"Items\" : \"Item\"]})"),
Html.X().RowBody().GetAdditionalData("getAdditionalData"),
Html.X().RowWrap()
)
Refresh the page and click the expand/collapse buttons.
Last edited by Daniil; May 20, 2014 at 7:56 AM.
Reason: [CLOSED]