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