I have a nested gridview and would like to know the best way to display the column summary data in the footer of the nested gridview.I am using template column to display the nested gridview and the following code to show the nested records within the master gridview. The parameters are within the sql datasourse.
I would like to place the sum of "INV_RECPT_AMT" into the footer of the nested gridview "GridViewInvoice" label "lblTotal"
Thank you for your help!
Code Behind
I would like to place the sum of "INV_RECPT_AMT" into the footer of the nested gridview "GridViewInvoice" label "lblTotal"
Thank you for your help!
Code Behind
VB.NET:
Protected Sub GridViewProject_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) _
Handles GridViewProject.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim mySDS As SqlDataSource = CType(e.Row.FindControl("SqlDataSourceInvoiceChild"), SqlDataSource)
mySDS.SelectParameters(0).DefaultValue = e.Row.DataItem("ELPM_NO")
Dim mySDSInvoice As SqlDataSource = CType(e.Row.FindControl("SqlDataSourceInvoiceNo"), SqlDataSource)
mySDSInvoice.SelectParameters(0).DefaultValue = e.Row.DataItem("ELPM_NO")
End If
End Sub
Attachments
Last edited: