Hi -
I have 2 user controls which are bound to the same ViewModel. See attached diagram. I am using the Aggregate Functions to get Sum,Count and average.
UC2 - where the grid exists - doesnt need to show these aggregate values
UC1 - has textboxes which will be displaying the aggregate values.
Since they both have the datacontext of the a same CommonViewModel - how can i set a property from UC2 of an aggregate value to a ViewModel Property - so then be leveraged in UC1.
Obviously if I had to show the values in UC2 directly - then i can do XAMl based simple stuff like this - but this doesnt help me here - since I want to show these values in UC1 (and not UC2)
Am attaching a complete working sample solution also to highlight the issue. Please see the CommonViewmodel and the 3 properties in there which i want to set with the aggregate value calculated from the gird in UC2.
Link for the working solution is as follows (since i cant upload it here) - https://github.com/pratikrshah/telerikaggsample
Can somebody please help
Thanks
I have 2 user controls which are bound to the same ViewModel. See attached diagram. I am using the Aggregate Functions to get Sum,Count and average.
UC2 - where the grid exists - doesnt need to show these aggregate values
UC1 - has textboxes which will be displaying the aggregate values.
Since they both have the datacontext of the a same CommonViewModel - how can i set a property from UC2 of an aggregate value to a ViewModel Property - so then be leveraged in UC1.
Obviously if I had to show the values in UC2 directly - then i can do XAMl based simple stuff like this - but this doesnt help me here - since I want to show these values in UC1 (and not UC2)
<
StackPanel
Grid.Row
=
"1"
>
<
TextBlock
Margin
=
"10,0,0,0"
Text
=
"{Binding AggregateResults[\AppCount\].FormattedValue, ElementName=FIBRE_App_Stats}"
/>
<
TextBlock
Margin
=
"10,0,0,0"
Text
=
"{Binding AggregateResults[\GrandTotal\].FormattedValue, ElementName=FIBRE_App_Stats}"
/>
</
StackPanel
>
Am attaching a complete working sample solution also to highlight the issue. Please see the CommonViewmodel and the 3 properties in there which i want to set with the aggregate value calculated from the gird in UC2.
Link for the working solution is as follows (since i cant upload it here) - https://github.com/pratikrshah/telerikaggsample
Can somebody please help
Thanks