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

Disabling grouping in PreRender

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JP
Top achievements
Rank 1
JP asked on 06 Oct 2014, 02:15 PM
Hello,

I want to disable the grouping in Grid's PreRender event but have trouble doing so. I believe this event is too late to disable grouping.
What other possibilities do I have?

Currently I'm doing this in Grid's PreRender event:
bool enableGrouping = settings.EnableGrouping && GroupingEnabled;
grid.GroupingEnabled = settings.EnableGrouping;
grid.ShowGroupPanel = settings.EnableGrouping;
grid.ClientSettings.AllowDragToGroup = enableGrouping;
grid.GroupingSettings.ShowUnGroupButton = enableGrouping;

But grouping is still possible. I don't want to hide the grouing header (which would work).

Thanks!

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 09 Oct 2014, 12:04 PM
Hello JP,

Generally, there are earlier events like Init or Load which you can try. I've created a sample RadGrid web site to test the described behavior and on my side the dragging of column headers is disabled as expected. Please run the attached application and let me know about the result.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
JP
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or