Datalist Row Color
I want to color the rows in a datalist depending upon the data values from the SQL query. I have no problem doing this in a datagrid databound using e.Item.cssclass but it seems to have no effect in the datalist.
This IF statement is within the Item_DataBound for the datalist. Everything else within the IF is working except for the e.Item.cssclass. I've tried removing all of the cssclass calls on the front page but that didn't do any good either.
Appreciate your time and input. Thank you.
If oDS.Tables(0).Rows(0).Item("HistStatus") = 0 Then
chkLeakBit1.Enabled = False
chkLeakBit2.Enabled = False
chkLeakBit3.Enabled = False
txtLeakFloat1.Enabled = False
txtLeakFloat2.Enabled = False
lbOutOfService.Visible = True
lbOutOfService.Text = " - Out Of Service"
e.Item.CssClass = "tva_item_darkgray"
Else
lbOutOfService.Visible = False
lbOutOfService.Text = ""
End If
|