Count of SelectedItems in a group

3 posts, 1 answers
  1. Michael Eaton
    Michael Eaton avatar
    7 posts
    Member since:
    Jan 2006

    Posted 15 Feb 2012 Link to this post

    I have a GridView that's grouped. When the groups are collapsed, I want to have the number of items selected in each group show up in the "collapsed header" for that group. I've poked around, but it doesn't look like it's possible.

    Any thoughts?
  2. Answer
    Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 15 Feb 2012 Link to this post

    Hi Michael,

    Count and other aggregations may be performed only over data . The selection is state of the UI rather than data. In order to achieve such behavior you will need to reflect the selection state in your business object. For example you may add an IsSelected property to your business object which bound to the selection state of the row representing that object.
    Then you can use regular aggregate function to show the selected items count per group even when it is collapsed.

    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. UI for WPF is Visual Studio 2017 Ready
  4. Michael Eaton
    Michael Eaton avatar
    7 posts
    Member since:
    Jan 2006

    Posted 15 Feb 2012 Link to this post

    Thanks. I'll see if I can work out the details to do this.
Back to Top