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

Binding aggregate function result to another element (TextBlock)

1 Answer 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
emi
Top achievements
Rank 1
emi asked on 25 Apr 2010, 11:04 AM
Hi,

I need to show the aggregated functions results from the footer outside of the RadGridView (binded to a TextBlock, let's say).
So, if I have:

<

 

 

telerikControls:RadGridView Name="MyGrid" CanUserFreezeColumns="False" ....

 

 

with a column like this:

<

 

 

telerikControls:GridViewDataColumn Header="MyColumn" IsFilterable="False"

 

 

        DataMemberBinding="{Binding MyProperty}">

 

    <telerikControls:GridViewDataColumn.AggregateFunctions>

 

        <telerikData:CountFunction Caption="Count: " />

 

    </telerikControls:GridViewDataColumn.AggregateFunctions>

 

</telerikControls:GridViewDataColumn> ...

 

 

and somewhere in the UI, a textblock like this:

<

 

 

TextBlock Name="MyTextBlock" Text="{Binding ElementName=MyGrid, Path=???CountResultFromFooter???}" />

 

 

How can I bind to MyTextBlock the result of the count aggregate function from MyColumn column?

Thanks!

 

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 26 Apr 2010, 12:11 PM
Hello,

I've attached example application to illustrate you how to achieve your goal.

Regards,
Vlad
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.
Tags
GridView
Asked by
emi
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or