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

How to add custom grouping behavior in code?

1 Answer 23 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vadimir
Top achievements
Rank 1
Vadimir asked on 28 Feb 2014, 09:01 AM
Hi,
In Telerik's Custom Grouping demo, a CustomGroupingBehavior is added in xaml.

<telerik:RadGridView Name="RadGridView1" behavior:CustomGroupingBehavior.IsEnabled="True"/>

How can I do this in C# code?

Thanks in advance.
Regards,
Gong

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 28 Feb 2014, 04:52 PM
Hi Gong,

You can achieve the desired result by using RadGridView's method SetValue which accepts a dependency property and the property value as parameters. The attached code snippet can serve as an example:
this.clubsGrid.SetValue(CustomGroupingBehavior.IsEnabledProperty, true);

Regards,
Hristo
Telerik
Tags
GridView
Asked by
Vadimir
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or