I'm attempting to implement a client-side expand-only-one-group function for a relatively simple RadGrid using the 2016Q1 release. I had thought it'd be as simple as:
<
script
type
=
"text/javascript"
>
function rgInspection_GroupExpanding(sender, eventArgs) {
sender.get_masterTableView().collapseAllGroups()
}
</
script
>
<
telerik:RadGrid
DataSourceID
=
"sdsInspection"
ID
=
"rgInspection"
runat
=
"server"
ShowHeader
=
"False"
>
<
ClientSettings
AllowGroupExpandCollapse
=
"True"
>
<
ClientEvents
OnGroupExpanding
=
"rgInspection_GroupExpanding"
/>
</
ClientSettings
>
<
MasterTableView
DataSourceID
=
"sdsInspection"
GroupLoadMode
=
"Client"
GroupsDefaultExpanded
=
"False"
>
…
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldName
=
"Title"
/>
</
SelectFields
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"DisplayOrder"
SortOrder
=
"Ascending"
/>
</
GroupByFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
</
MasterTableView
>
</
telerik:RadGrid
>
but that doesn't work.
So I tried expanding all of the groups by clicking them, then running $find("ctl00_cphMain_rgInspection").get_masterTableView().collapseAllGroups(); from the console. It returned 'true' but didn't actually collapse anything. I tried again specifying the optional argument: 0 returns true, everything else returns false, none of the groups actually collapse. I'm at my wits end here and can't for the life of me figure out if it's something I'm doing wrong or a legitimate bug.
I can't have the page postback until the final submission, so using a server-side expand-only-one solution isn't going to work for me. Any help would be greatly appreciated.