This is a migrated thread and some comments may be shown as answers.
is it possible to Group data without enabling the feature?
2 Answers 14 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexandre Jobin
Top achievements
Rank 1
Alexandre Jobin asked on 21 Mar 2011, 08:58 PM
hi!

i would like to group data in my grid but without letting the user choose the column and without the row header for the drag & drop. Is it possible to do that?

alex

2 Answers, 1 is accepted

Sort by
0
Accepted
Andrew
Top achievements
Rank 1
answered on 21 Mar 2011, 11:27 PM
Hi Alexandre,

Yes, this is possible. Just define column(s) to group by and use Visible(false):

.Groupable(settings => settings.Groups(groups => groups.Add(o => o.GroupByColumn)).Visible(false))

0
Alexandre Jobin
Top achievements
Rank 1
answered on 22 Mar 2011, 08:42 PM
great! thank you.

just to add a little something, if you want to deal with group manually with javascript, heres the code:

<javascript>
var grid = $("#myGrid").data("tGrid");
   
// remove any active groups
grid.groups = [];
   
// group with this column
grid.group("Column title");
</javascript>
Tags
Grid
Asked by
Alexandre Jobin
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Alexandre Jobin
Top achievements
Rank 1
Share this question
or