This question is locked. New answers and comments are not allowed.
I would like to predefine some groups and added a GroupDescriptor object to QDSCV.GroupDescriptors collection. And the QDSCV is my GridView's ItemsSource. But in the UI users can group by the same column twice. It's not expected behaviour.
4 Answers, 1 is accepted
0
Hi,
Vlad
the Telerik team
You can predefine grouping using ColumnGroupDescriptor in a view model between your data and your UI layer.
Regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
vk
Top achievements
Rank 1
answered on 01 Feb 2012, 09:31 AM
Hi Vlad,
Do you mean I have to create UI elements in my ViewModel class or I misunderstood something? The ViewModel doesn't (and shouldn't) know anything about my View class where a GridView and all the GridViewColumns are defined using just XAML.
Thank you.
Do you mean I have to create UI elements in my ViewModel class or I misunderstood something? The ViewModel doesn't (and shouldn't) know anything about my View class where a GridView and all the GridViewColumns are defined using just XAML.
Thank you.
0
Hello,
Vlad
the Telerik team
The view model (MVVM) is about separation of concerns and reusability and ColumnGroupDescriptor are not UI elements. You can check for more info our demos to know more about how bind the grid columns from your models, predefine sorting, filtering, grouping, etc.
All the best,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
vk
Top achievements
Rank 1
answered on 01 Feb 2012, 12:33 PM
Hi Vlad,
I couldn't find any example of using a ColumnGroupDescriptor in viewmodels and I would be gratefull if you point me at some place where it is described. I know how to create it in XAML or code-behind class for a view, but since a ColumnGroupDescriptor requires a GridViewColumn from Telerik.Windows.Controls namespace I don't get the point for placing it in viewmodels.
Thank you in advance!
I couldn't find any example of using a ColumnGroupDescriptor in viewmodels and I would be gratefull if you point me at some place where it is described. I know how to create it in XAML or code-behind class for a view, but since a ColumnGroupDescriptor requires a GridViewColumn from Telerik.Windows.Controls namespace I don't get the point for placing it in viewmodels.
Thank you in advance!