Flashcoders doesn't seem to be responding, so I hope it's OK to ask
here:

I'm using the CellRenderer API with a datagrid for the first time. It's
working great, I'm adding checkboxes to cells in the datagrid. 

However, in my class CheckBoxCell which extends mx.core.UIComponent, I
added some code to the inherited setValue method:

        function setValue(str:String, item:Object, sel:Boolean) : Void
        {
                cb._visible = (item!=undefined);
                if(item[getDataLabel()] == "Y") { cb.selected = true }
else { cb.selected = false };
        }

This works fine to make all my checkboxes checked or not checked if the
item's data in dataprovider is Y or N, but it also causes some odd
behaviour in that the checkbox, after clicked by the user, will revert
back to it's original dataprovider value. I think I understand why, as
the datagrid keeps it's children rendered to it's set dataprovider
values, but I'm not sure what to do about it.  Do I need to change the
dataprovider values first?  If so, how from within the CheckBoxCell
class?  Or how do you normally handle this?

Thanks,

Jason Merrill
Bank of America 
Learning & Organizational Effectiveness
 
 
 
 
 

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to