Count No. fo Groups

2 posts, 1 answers
  1. Bharat Mendapara
    Bharat Mendapara avatar
    18 posts
    Member since:
    Sep 2013

    Posted 05 Jun 2014 Link to this post

    I want to count total numbers of group in the gridview.
    So how is this possible?
    can you help me?

    I also added a image which I want.

    Regards,
    Bharat Mendapara
  2. Answer
    Yoan
    Admin
    Yoan avatar
    1214 posts

    Posted 05 Jun 2014 Link to this post

    Hello Bharat,

    In order to achieve your goal, you can predefine the GroupHeaderRow's template of your column like so:
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}">
                       <telerik:GridViewDataColumn.GroupHeaderTemplate>
                           <DataTemplate>
                               <StackPanel>
                                   <TextBlock  Text="{Binding Group.Items.Count}" />
                               </StackPanel>
                           </DataTemplate>
                       </telerik:GridViewDataColumn.GroupHeaderTemplate>
                   </telerik:GridViewDataColumn>


    Regards,
    Yoan
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top