Rank: Advanced Member Groups: Member
Joined: 10/20/2008 Posts: 75
|
How can i change the backgroung-color of a cells of eo:grid ?
Code: Visual Basic.NET
For Each Item As EO.Web.GridItem In Grid1.Items
If Item.Cells("myval").Value = "GREEN" Then
Item.Cells("myval").Style = "background-color:#00FF00;"
End If
Next
this code don't works. thanks.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, GridCell.Style takes a CSS class name, not inline CSS text. So it will be something like Item.Cells("myval").Style = "green_text". While you have class "green_text defined in your CSS file:
Code: CSS
.green_text
{
background-color:#00FF00;
}
Thanks!
|