GroupDescriptor and ColumnGroupDescriptor

5 posts, 0 answers
  1. vk
    vk avatar
    46 posts
    Member since:
    Jul 2012

    Posted 31 Jan 2012 Link to this post

    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.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 01 Feb 2012 Link to this post

    Hi,

     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 >>

  3. vk
    vk avatar
    46 posts
    Member since:
    Jul 2012

    Posted 01 Feb 2012 Link to this post

    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.
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 01 Feb 2012 Link to this post

    Hello,

     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 >>

  5. vk
    vk avatar
    46 posts
    Member since:
    Jul 2012

    Posted 01 Feb 2012 Link to this post

    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!
Back to Top