This is a migrated thread and some comments may be shown as answers.

Group expand/collapse client event does not happen

1 Answer 244 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 31 Jan 2012, 10:03 PM
Hi,
I have the following code snippets:
radGrid.ShowGroupPanel = true;
radGrid.MasterTableView.GroupLoadMode = GridGroupLoadMode.Client;
radGrid.ClientSettings.AllowDragToGroup = true;
radGrid.ClientSettings.AllowExpandCollapse = true;
radGrid.ClientSettings.ClientEvents.OnGroupExpanded = "GroupExpanded";
radGrid.ClientSettings.ClientEvents.OnGroupCollapsed = "GroupCollapsed";
radGrid.GroupingSettings.ShowUnGroupButton = true;
The GroupExpanded and GroupCollapsed never  happens, I tried:
function GroupExpanded(s, e) {
    alert('GroupExpanded');
}
Nothing happens.

Am I missing something?
Thanks

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 01 Feb 2012, 09:01 PM
Matt:

Try modifying your code as follows:
// from
radGrid.ClientSettings.AllowExpandCollapse = true;
// to
radGrid.ClientSettings.AllowGroupExpandCollapse = true;

Referenceing the Grid / Client Group Load online demo that states in the description area:

You can control where the grouping will be handled using the GroupLoadMode property of the GridTableView instance. There are two options: 

- Server-side - GridTableView.GroupLoadMode.Server - this is the default behavior. Groups are expanded after postback to the server for example: 

<MasterTableView GroupLoadMode="Server"> 

- Client-side - GridTableView.GroupLoadMode.Client - Groups will be expanded client-side and no postback will be performed. 

<MasterTableView GroupLoadMode="Client"> 

and set the ClientSettings -> AllowGroupExpandCollapse attribute to true: 

<ClientSettings AllowGroupExpandCollapse="True"> 

I have the events firing in my demo. See "radgridgroupcollapsedevent.png " and "radgridgroupexpandedevent.png" screenshots.

Hope this helps!
Tags
Grid
Asked by
Matt
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or