This is a migrated thread and some comments may be shown as answers.

Count No. fo Groups

1 Answer 59 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bharat Mendapara
Top achievements
Rank 1
Bharat Mendapara asked on 05 Jun 2014, 12:31 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Yoan
Telerik team
answered on 05 Jun 2014, 02:30 PM
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.
 
Tags
GridView
Asked by
Bharat Mendapara
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or