In my project I am using Telerik RadGridView control, ItemSource of which is list of dynamic objects (derived from DynamicObject).
I was planning to use AggregateFunctions, like SumFunction, MinFunction, but it is crashing in columns, which are getting values from dynamic properties. If I am correct, it is because of Linq extensions, and not Telerik.
Is there any workaround for this issue?
Update
model class looks like this
public class SampleModel : DynamicObject
{
// some properties
}
Source is like:
myGrid.ItemsSource = new List<SampleModel> { // some model items };
XAML is:
<telerik:RadGridView ShowColumnFooters="True" AutoGenerateColumns="False" x:Name="myGrid">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding p1}">
<telerik:GridViewDataColumn.AggregateFunctions>
<telerik:SumFunction />
</telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Where p1 is dynamic property
Exception message is:
No generic method 'Sum' on type 'System.Linq.Enumerable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.