Welcome Guest Search | Active Topics | Sign In | Register

set Grid cell's background color Options
Luke
Posted: Wednesday, May 18, 2011 1:16:57 PM
Rank: Advanced Member
Groups: Member

Joined: 11/2/2010
Posts: 38
Sirs:

I try to change the backgroud color of a grid cell from the follow script function,
but it didn't work, would you help me:
Thanks

function endedit_handler(cell, newValue) {
//Get the quantity entered by the user
var quantity = parseInt(newValue);
cell.backgroundColor = "Red";
return newValue.toString();

}
eo_support
Posted: Wednesday, May 18, 2011 2:23:00 PM
Rank: Administration
Groups: Administration

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

You can use this function to change a Grid cell's style at runtime:

http://doc.essentialobjects.com/library/1/jsdoc.public.gridcell.overridestyle.aspx

Note this changes the style of the "cell'. It does not change styles of any elements inside the cell. For example, if your cell has a textbox, then this function will not change the style of the textbox.

In the future you should check the reference to find out what is available and what is not available. You can not just pull something out of your head and hope it would work. If the documentation doesn't have it, then it does not exist and will not work.

Thanks!

Luke
Posted: Wednesday, May 18, 2011 2:40:32 PM
Rank: Advanced Member
Groups: Member

Joined: 11/2/2010
Posts: 38
Yes, Sir. Thanks
Luke
Posted: Wednesday, May 18, 2011 3:55:03 PM
Rank: Advanced Member
Groups: Member

Joined: 11/2/2010
Posts: 38
It's worked, thanks again, You are my sunshine !


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.