Welcome Guest Search | Active Topics | Sign In | Register

Setting individual cell background color Options
Paul
Posted: Saturday, March 12, 2011 6:16:58 PM
Rank: Newbie
Groups: Member

Joined: 3/5/2011
Posts: 2
I am trying to set an individual cell's back ground color. With a normal gridview this is easy to do by doing this: grid.rows(y).cells(x).backcolor = color.red

However, I don't see that method available. How do I accomplish this?

eo_support
Posted: Monday, March 14, 2011 9:22:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

If you do it from server side, then the style information must come from your data source through the GridColumn's StyleField property. StyleField would be the name of a data field in your data source. At runtime, the Grid would populate the column through DataField, then set each cell's style through StyleField. See here for an working example of this feature:

http://demo.essentialobjects.com/Demos/Grid/Features/Conditional%20Formatting%20-%20Cell%20Based/Demo.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.