We have a RadGrid control called "RadGrid1" and have it defined as follows in our ASPX page
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Both">
In our Vb.Net codebehind, we are using an aggregate function as follows to display the sum in the footer of the grid.
boundcol(index).Aggregate() = GridAggregateFunction.Sum
We do not want all the row items to be included in this sum.
Is there a way to only include the last 2 records in the summation?
I tried to configure RadGrid1_CustomAggregate using the follow code in the ASPX file
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Both" Aggregate="Custom" OnCustomAggregate="RadGrid1_CustomAggregate">
The vb.net file looks like the following for CustomAggregate configuration:
Protected Sub RadGrid1_CustomAggregate(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCustomAggregateEventArgs) Handles RadGrid1.CustomAggregate
However, this event is not being fired.
I am using Telerik DevCraft version 2013.3 1014
Please advise how we can only include the last 2 records in the summation.