i m using the following code to change the back color of cell but vaue of e.Row.Cells(4) is coming as nothing
Protected Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim cell As TableCell = e.Row.Cells(4)
Dim quantity As String = (cell.Text).ToString
If quantity < "10000" Then
cell.BackColor = Color.Red
End If
If quantity >= "10000" AndAlso quantity < "50000" Then
cell.BackColor = Color.Yellow
End If
If quantity >= "50000" Then
cell.BackColor = Color.Orange
End If
End If
End Sub
is i take quantity as integer it is giving system.format.exception