button1.CssClass = "vf vf1"
button2.CssClass = "vf vf2"
button3.CssClass = "vf vf3"
...
CSS Example:
.vf
.rtbIcon
{
height: 32px;
width: 32px;
background-image: url(sprite.png)
background-repeat: no-repeat;
}
.vf0
.rtbIcon { background-position : 0 0px; }
.vf1
.rtbIcon { background-position : 0 -32px; }
.vf2
.rtbIcon { background-position : 0 -64px; }
.vf3
.rtbIcon { background-position : 0 -96px; }
In my grid I have made GridTemplateColumns with labels inside to display text of various colors. I determine the different color for the text in the code behind of the RadGrid1_ItemDataBound event. However, I would like to go away from this and just change the forcolor of the text in a GridBoundColumn.
How can I access the GridBoundColumn from the code behind in the RadGrid1_ItemDataBound event?
This is how I get a labels properties, but I can't get it to work for GridBoundColumns.
| Label time = (Label)e.Item.Cells[0].FindControl("LabelTime"); |