4 Answers, 1 is accepted
0
Kjell
Top achievements
Rank 1
answered on 27 Sep 2010, 09:04 PM
Ok I figured out I can look at the groupcount and then cancel additional grouping in the "Grouping" event, but is there a better way?
0
Hello Kjell,
Vlad
the Telerik team
Currently this is the only way (Grouping event) to achieve this.
Kind regards,Vlad
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Trupti
Top achievements
Rank 1
answered on 19 Jun 2012, 11:04 AM
Hi , can you please provide the code you have used to limit the columns to group by?
0
Kjell
Top achievements
Rank 1
answered on 19 Jun 2012, 02:51 PM
Sure, the name of my grid is "rgvEvents" and this is my "Grouping" event handler.
void
rgvEvents_Grouping(
object
sender, GridViewGroupingEventArgs e)
{
try
{
//don't allow more than 3 groups at a time
if
(rgvEvents.GroupCount > 3 && e.Action == Telerik.Windows.Controls.GroupingEventAction.Place)
{
e.Cancel =
true
;
}
}
catch
{ }
}