Programmatic Grouping with GroupDescriptors

3 posts, 0 answers
  1. Daniel
    Daniel avatar
    2 posts
    Member since:
    Feb 2012

    Posted 27 Feb 2012 Link to this post

    Hi,

    i want to use the programmatic grouping with the xaml code

    <

    telerik:RadGridView.GroupDescriptors>

    <telerik:GroupDescriptor Member="Status"

                                                       SortDirection="Ascending" />

    </telerik:RadGridView.GroupDescriptors>

     


    it works fine.

    But if i want to disable the grouping by removing the "Status" from the Header i am not able to put it back into to Header to sort the GridView again. I am tried to build a workaround with the code IsGroupable="True" but nothing happens.

    Okay i tried to start again and remove ALL the code from the xaml, but now not even manually grouping is possible....!?!?
    I am a little bit confused i hope you guys can help me to find the problem!

    Thanks a lot

    Daniel

  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 27 Feb 2012 Link to this post

    Hi Daniel,

    If I understand correctly you need to initially group by "Status" and later prevent the user from ungrouping  by "Status" ?

    If this is the case - you will need to handle the GroupingEvent of RadGridView. Inside the event handler check the action and if it is ungrouping by the "status field" - cancel it ( e.Cancel=true).

    Let me know  in case you need additional assistance on this one.

    Regards,
    Pavel Pavlov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Daniel
    Daniel avatar
    2 posts
    Member since:
    Feb 2012

    Posted 27 Feb 2012 Link to this post

    Hi Pavel,

    hmmm no not really, first of all i just want to remove the automatic grouping function completely from the project. But since i tried to implement the, i call it "startup-grouping", i cannot remove it from the project.

    I tried to delete the complete code:

    <telerik:RadGridView.GroupDescriptors>

    >

    <telerik:GroupDescriptor Member="Status"

                                                       SortDirection="Ascending" />

    </telerik:RadGridView.GroupDescriptors>

    but now i am not able to group the Grid again because the Groupsymbol of the Status Column is missing, i am not sure how to bring this function back to the application, is it a failure of the control?

    I dont write any other code into the application just these few Lines:
     

    <telerik:RadGridView.GroupDescriptors>

    >

    <telerik:GroupDescriptor Member="Status"

                                                       SortDirection="Ascending" />

    </telerik:RadGridView.GroupDescriptors>

    I rebuild this problem on 2 different machines with 2 different Versions of our Application.

    Thanks for your help

    Daniel

Back to Top