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

[Solved] Grouping after rebind

2 Answers 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Piotr
Top achievements
Rank 1
Piotr asked on 22 Mar 2012, 04:54 PM
Hi All!
I've spotted that grid.rebind() does not clear grouping, while it clears filters and order settings. How can one remove all grouping from the grid on the client side before rebind? Is this a bug or intended behaviour?
Regards
Piotrek

2 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 23 Mar 2012, 01:08 PM
Hello Piotr,

Thank you for contacting us, this behavior will be added in one of the future releases. For now you could use the the following JavaScript to clear the groups before you rebind the Grid and then set the grouping hint.

var grid = $('#Grid').data('tGrid');
grid.groupBy='';
grid.groups=[];
grid.rebind();
grid.$groupHeader.html(grid.localization.groupHint);


Regards,
Petur Subev
the Telerik team
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Piotr
Top achievements
Rank 1
answered on 23 Mar 2012, 01:23 PM
That worked for me. Thank you very much for fast reply.
Cheers!
Piotrek
Tags
Grid
Asked by
Piotr
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Piotr
Top achievements
Rank 1
Share this question
or