Hi Telerik team,
i strucked in getting result in rad grid footer. bcoz itemdatabound firing twice in vb.net, result is getting doubled.
Dim total As Integer
Protected Sub grdAddList_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grdAddList.ItemDataBound
Try
If TypeOf e.Item Is GridDataItem Then
Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
Dim fieldValue As Integer = Integer.Parse(dataItem("Amount").Text)
total = (total + fieldValue)
End If
If TypeOf e.Item Is GridFooterItem Then
Dim footerItem As GridFooterItem = CType(e.Item, GridFooterItem)
footerItem("Amount").Text = "Total: " + total.ToString()
End If
Catch ex As Exception
Dim strExpMsg As String
strExpMsg = className & "." & MethodBase.GetCurrentMethod().Name & "()" & "->" & ex.Message.ToString()
ExceptionHandler(strExpMsg, ex, Me.strUserName)
End Try
End Sub
Thanks,
Lokesh