I have created telerik gridview and i have binded datatable as itemssource of radgridview. Find below definiton.
<
tkGrid:RadGridView x:Name="grdRows"
SelectionMode="Extended" ShowGroupPanel="False"
AutoGenerateColumns="False"
ScrollMode="RealTime" ShowColumnFooters="True" ShowGroupFooters="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
EnableRowVirtualization="False"
EnableColumnVirtualization="False"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
HorizontalGridLinesBrush="White"
VerticalGridLinesBrush="White"
MaxHeight="700"
Visibility="Visible" >
<tkGrid:RadGridView.Columns>
<tkGrid:GridViewDataColumn
Width="Auto"
DisplayIndex="0"
Header="Rep"
DataMemberBinding="{Binding Name}"
IsSortable="True"
TextWrapping="Wrap">
<tkGrid:GridViewDataColumn.CellTemplate>
<DataTemplate>
<HyperlinkButton x:Name="hlnkEmployee" Foreground="Blue" Content="{Binding Name}" ToolTipService.ToolTip="{Binding Name}" ClickMode="Press" TargetName="_blank" >
</DataTemplate>
</tkGrid:GridViewDataColumn.CellTemplate>
</tkGrid:GridViewDataColumn>
<tkGrid:GridViewDataColumn
UniqueName="Hours"
Header="Hours"
FooterTextAlignment="Right"
TextAlignment="Right"
TextWrapping="Wrap"
IsResizable="True">
<
tkGrid:GridViewColumn.AggregateFunctions>
<tkData:SumFunction SourceField="Hours" ResultFormatString="{}{0}" />
</tkGrid:GridViewColumn.AggregateFunctions >
</tkGrid:GridViewDataColumn>
</tkGrid:RadGridView.Columns>
</tkGrid:RadGridView>
I am binding above radgridview itemssource as datatable. If i run the page it is showing error'No generic method sum on type 'System.linq.enumerable' like that. herewith i have attached the screenshot.
If we bind property of class,aggregate function is working fine. But if we use datatable then it is showing an error.
In some of forums in telerik mentioned that we have to give datatype of gridviewdatacolumn. So i have tried created taht column in code behind and gave datatype.Still i am getting same error.
Please anyone give the example for sum aggregatefunction of gridviewdatacolumn if we bind gridview itemssource as datatable.
Regards
Lakshmi