Here's an example of how to add a total to a GridViews' footer. Let's say we have a function which gives the total value of sales of a given product, which receives a single paramater of productID.
Protected Sub gv_RowDataBound(ByVal sender As Object, ByVal e As _ System.Web.UI.WebControls.GridViewRowEventArgs) Handles gv.RowDataBound
e.Row.Cells(2).Text = "TOTAL : "
e.Row.Cells(3).Text = GetTotal(request.querystring("productID"))
End Sub
No comments:
Post a Comment