is it possible to have a predefined grouping that the user can not remove? And is it possible to have a fix sort order on that grouping - also not changeable by the user?
Regards,
Raul
1 Answer, 1 is accepted
0
Stefan
Telerik team
answered on 23 Mar 2017, 11:18 AM
Hi Raul,
Your first requirement can be achieved by defining a ColumnGroupDescriptor and utilizing the Grouping event of the control. Note, that this event is triggered both when the user tries to group and ungroup. Thus, you should be able to benefit from it and disable the ungrouping from the UI. Please, refer to the code snippets below.
if ((e.GroupDescriptor as ColumnGroupDescriptor).Column.UniqueName == "Name")
{
e.Cancel = true;
}
}
Can you please give the approach a try and let me know how it goes?
As to your second question regarding the sorting, may I kindly ask you to clarify to which sorting do you refer? Do you mean the items within each group, or the groups as a whole?
Best Regards,
Stefan X1
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.