T
tshad
I just found an interesting anomaly that I had not seen before.
It seems to affect both Datalist and Datagrids. If you set the background
color of the DataGrids using CSSClass (which is valid) instead of using
backcolor, you cannot programmatically set the color of the datalistitem or
datagriditem.
I was doing this to indicate which row the user wanted to move. I would set
the color as green. But I found that every other color would not show the
green color. After some checking I found that I had set the alternating
color as linen like so:
<alternatingitemstyle CssClass=alternateRow
if I set it as:
<alternatingitemstyle backcolor="linen"
I have no problem.
I am not sure why it works ok with backcolor, but I assume that when I
programmatically set the color like so:
Dim oDLI as DataListItem = s.parent.parent
oDLI.BackColor = System.Drawing.Color.Green
when the page is returned the CSS Class is applied over the color I had set.
Interesting, but not fun.
Tom
It seems to affect both Datalist and Datagrids. If you set the background
color of the DataGrids using CSSClass (which is valid) instead of using
backcolor, you cannot programmatically set the color of the datalistitem or
datagriditem.
I was doing this to indicate which row the user wanted to move. I would set
the color as green. But I found that every other color would not show the
green color. After some checking I found that I had set the alternating
color as linen like so:
<alternatingitemstyle CssClass=alternateRow
</alternatingitemstyle>
if I set it as:
<alternatingitemstyle backcolor="linen"
</alternatingitemstyle>
I have no problem.
I am not sure why it works ok with backcolor, but I assume that when I
programmatically set the color like so:
Dim oDLI as DataListItem = s.parent.parent
oDLI.BackColor = System.Drawing.Color.Green
when the page is returned the CSS Class is applied over the color I had set.
Interesting, but not fun.
Tom