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

Count...Row Details

2 Answers 17 Views
GridView
This is a migrated thread and some comments may be shown as answers.
mark baer
Top achievements
Rank 1
mark baer asked on 14 May 2010, 11:04 PM
I am using Row Details but when the row is collapsed, the users would like to see the "Count" of how  many items are in the Details without expanding it.  I have an Object Hierarchy that I am binding to the grid like Order/Order.OrderDetailRow kind of thing...I see in Grouping with the RadGridView how to do a Count and display it, but can I do a Count with Row Details?  Not sure how.

thanks

Mark

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 15 May 2010, 06:57 AM
Hello mark baer,

The only way I can think of would be to add a column to the row that will show the count of the details collection. The column would be bound to OrderDetails.Count. I hope this helps.

Kind regards,
Ross
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
mark baer
Top achievements
Rank 1
answered on 17 May 2010, 06:56 PM
Got it thanks.  I was thinking something like that, but I wasn't sure how to get it done.  For anyone else, this is how I got it:

Thanks again.

mark

 

 

<telerikGridView:GridViewDataColumn DataMemberBinding="{Binding Elements.Count}" Header="">

 

 

 

     <telerikGridView:GridViewDataColumn.CellTemplate>

 

 

 

          <DataTemplate>

 

 

 

               <StackPanel Orientation="Horizontal">

 

 

 

                    <TextBlock Text="Count: " />

 

 

 

                    <TextBlock Text="{Binding Elements.Count}"></TextBlock>

 

 

 

               </StackPanel>

 

 

 

          </DataTemplate>

 

 

 

     </telerikGridView:GridViewDataColumn.CellTemplate>

 

 

 

</telerikGridView:GridViewDataColumn>

 

Tags
GridView
Asked by
mark baer
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
mark baer
Top achievements
Rank 1
Share this question
or