I have a universal usercontrol that has by default in xaml the groupby turned on.
If I want to turn it off dynamically how do I do this in the C# code?
Thanks ahead of time
Jack
Thanks !!!! Not sure why it works today, but it does !
Probably the GroupByAreaLocation is not yet initialized. Which event are you using to set it? I tried this and it works correctly :
xamDataGrid1.Loaded += (s, e) =>
{
xamDataGrid1.GroupByAreaLocation = GroupByAreaLocation.None;
//or
xamDataGrid1.GroupByAreaMulti.Visibility = System.Windows.Visibility.Collapsed;
};
I was reading the API's and these are readonly properties :-(
Any other clues?
Alex
I still can not get it to work.
Everytime I try ot use the GroupByAreaMulti in my cs code, i get an exception. It is always set to Null.
I turn on the group by feature in the xaml code with
GroupBySummaryDisplayMode
= "SummaryCellsAlwaysBelowDescription"
Now if I set the GroupBySummaryDisplayMode = "None" I do not get it. The problem with this, is I can not do this dynamically in code that uses this usercontrol.
So, how do I set this parameter to None in the C Sharp part of the code?
Thanks again..
Hello Jack,
The GroupByArea is the previous grouping control used in older versions. According to your description, you are using the new group by area, which is the GroupByAreaMulti. Please try setting the same properties for the GroupByAreaMulti instead of the GroupByArea.