Click here to Skip to main content
15,917,971 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Protected Sub GridView3_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView3.RowDataBound
       If e.Row.RowType = DataControlRowType.DataRow Then
           excess = IIf((DataBinder.Eval(e.Row.DataItem, "HQRH_DISCRRECONCILE")) Is DBNull.Value, "0.00", (DataBinder.Eval(e.Row.DataItem, "HQRH_DISCRRECONCILE")))
           paid = IIf((DataBinder.Eval(e.Row.DataItem, "HQRH_ADJUSTAMOUNT")) Is DBNull.Value, "0.00", (DataBinder.Eval(e.Row.DataItem, "HQRH_ADJUSTAMOUNT")))
           unpaid = IIf((DataBinder.Eval(e.Row.DataItem, "HQRH_DISCRADJUSTMENT")) Is DBNull.Value, "0.00", (DataBinder.Eval(e.Row.DataItem, "HQRH_DISCRADJUSTMENT")))
           sumExcess = sumExcess + excess
           sumPaid = sumPaid + paid
           sumUnpaid = sumUnpaid + unpaid
           'CType(e.Row.Cells(2).FindControl("label45"), Label).Text = Format(excess, "0.00")
           'CType(e.Row.Cells(3).FindControl("label1"), Label).Text = Format(paid, "0.00")
           'CType(e.Row.Cells(3).FindControl("label5"), Label).Text = Format(unpaid, "0.00")
       ElseIf e.Row.RowType = DataControlRowType.Footer Then
           'If (GridView3.Rows.Count > 0) Then

           Dim gridVal As String = e.Row.Cells(3).Text.ToString
           Dim lastValue As String = TryCast(ViewState("myVal"), String)
           If gridVal > 0 Then
               lastValue += 1
               ViewState("myVal") = lastValue
           End If
           CType(e.Row.Cells(3).FindControl("Label46"), Label).Text = GridView3.Rows.Count.ToString
           CType(e.Row.Cells(4).FindControl("Label43"), Label).Text = GridView3.Rows.Count.ToString
           CType(e.Row.Cells(4).FindControl("Label22"), Label).Text = GridView3.Rows.Count.ToString
           CType(e.Row.Cells(3).FindControl("Label47"), Label).Text = Format(sumExcess, "0.00")
           CType(e.Row.Cells(4).FindControl("Label44"), Label).Text = Format(sumPaid, "0.00")
           CType(e.Row.Cells(4).FindControl("Label4"), Label).Text = Format(sumUnpaid, "0.00")
       End If
   End Sub



unable to get the count of rows which is having data for certain column
can u help to modify the lines of rowcount in this
thanks for helping in adv
Posted
Updated 7-Oct-10 5:13am
v2
Comments
Kschuler 7-Oct-10 11:13am    
I edited your question - changed your code block so it formatted properly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900