Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
        If e.Row.RowType = DataControlRowType.DataRow Then
            sum += Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "某欄位"))
        ElseIf e.Row.RowType = DataControlRowType.Footer Then
            e.Row.Cells(0).Text = "總計"
            e.Row.Cells(1).Text = sum.ToString()
            e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
            e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
            e.Row.Font.Bold = True
        End If
    End Sub


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Roger 的頭像
    Roger

    歡迎~ 程式設計 學生 作業 專題製作 程式外包 家教...

    Roger 發表在 痞客邦 留言(0) 人氣()