in my code below i want to add that if reorderthreshold is 2 away from the quanity to make the row red? how would i code that below?
Protected Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs)
sqlthreshold.selectcommand = "select quantity,reorderthreshold from hardware"
Dim dv As DataView = CType(sqlthreshold.select(DataSourceSelectArguments.Empty), DataView)
If e.Row.RowType = DataControlRowType.DataRow Then
If dv.Count > 0 Then
Dim i As Integer = 0
Dim dr As DataRow = dv.ToTable().Rows.Item(e.Row.RowIndex)
Session("quantity") = dr.Item(0).ToString
Session("reorderthreshold") = dr.Item(1).ToString
End If
If Integer.Parse(Session("quantity").ToString) > Integer.Parse(Session("reorderthreshold").ToString) Then
For ccount As I ...
Go to the complete details ...