Hi All,
I am facing a problem in using item renderers. I have a checkbox as an item 
renderer in a datagrid. When I check/uncheck the checkbox, the color of the 
checkbox should change from its default color to yellow. And on click of a save 
button, I am saving the changes to the database and refreshes the grid. But 
what happens then is,due to the recycling of renderers, the yellow checkbox is 
appearing on some other row/column. I know that this happens because I am not 
resetting the yellow to default color. I also don't know where to reset the 
yellow to default color.


This is what I did,..
on click of check box, in the click handler, i set the yellow color 
setStyle('fillColors',['#eccd12', '#e9d76c','#eccd12', '#e9d76c']);
setStyle('fillAlphas',['1','1','1','1']);

also set a boolean variable isEdited to true

In override public function set data():void
{
if(isEdited)
{
//set yellow
   setStyle('fillColors',['#eccd12', '#e9d76c','#eccd12', '#e9d76c']);
   setStyle('fillAlphas',['1','1','1','1']);
}
else
{
//set default color
   setStyle('fillColors',['#FFFFFF', '#CCCCCC','#FFFFFF', '#EEEEEE']);
   setStyle('fillAlphas',['0.6','0.4','0.75','0.65']);
}
}

This doesnt solve the problem.

Can someone please help me in this?

Thanks
Shameer



Reply via email to