Welcome Guest Search | Active Topics | Sign In | Register

Need example for using GridCell.overrideStyle(style) Options
Joan Darling
Posted: Saturday, January 3, 2015 11:29:00 AM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
I need to change the cell's background, color and font-weight while an operation is being performed but I can't seem to get it to work. Also the doc says "Call overrideStyle(null) to clear any previous values." does this mean I can pass a null to remove the override so the cell will look normal again?

I've tried
1.
Code: JavaScript
gridItem.getCell(7).overrideStyle("background-color:#D3D3D3;color:#FFFFFF;font-weight:bold;")

2.
Code: JavaScript
gridItem.getCell(7).overrideStyle("style='background-color:#D3D3D3;color:#FFFFFF;font-weight:bold;'")
eo_support
Posted: Monday, January 5, 2015 6:50:14 PM
Rank: Administration
Groups: Administration

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

You can only pass CSS class name to overrideStyle. You can not pass inline styles. So for example, you would use it like this:

Code: CSS
.blue_text
{
    color: blue;
}


Code: JavaScript
gridItem.getCell(7).overrideStyle("blue_text");


Note here "blue_text" is a CSS class name that you have already defined in your page.

Thanks!
Joan Darling
Posted: Tuesday, January 6, 2015 5:22:24 AM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
great 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.