Alright, seems to me I have gotten it working. Thanks. One more thing to ask though. What my checkbox does is it enables/disables a column it is in. When it's unchecked the column is enabled and I cam modify column's data. When I finish editng I am clicking on a checkbox again to disable the column. What's happening is that it takes two clicks to actually disable the column. First click would end cell's editing mode and second one will actually check the checkbox. I am not sure this side effect is related to this solution, I think that's the way it works "out of the box". Do you think it is possible to improve the solution to makes it work on the first click?
Thanks. --- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote: > > The examples on my blog extend DataGridColumn to add a place for the > renderer to store things > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of markgoldin_2000 > Sent: Tuesday, May 06, 2008 3:28 PM > To: [email protected] > Subject: [flexcoders] Re: Strange behavior > > > > But I am using checkbox (is that what you meant?) in the header. Does > it have any kind of data to base the checkbox's state on? > > --- In [email protected] <mailto:flexcoders% 40yahoogroups.com> > , "Alex Harui" <aharui@> wrote: > > > > If you look at the comboboxheaderrenderer example you'll see that it > > always pulls its data from the column so the renderer can be > recycled or > > recreated. It does not store state within itself > > > > > > > > ________________________________ > > > > From: [email protected] <mailto:flexcoders% 40yahoogroups.com> > > [mailto:[email protected] <mailto:flexcoders% 40yahoogroups.com> > ] On > > Behalf Of markgoldin_2000 > > Sent: Tuesday, May 06, 2008 3:17 PM > > To: [email protected] <mailto:flexcoders% 40yahoogroups.com> > > Subject: [flexcoders] Re: Strange behavior > > > > > > > > I see. I am looking into your blog to find the answer but I can't > > find it. Could you please help me to understand what do I do with > > recycling problem? > > > > Thanks alot. > > > > --- In [email protected] > <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% > 40yahoogroups.com> > > , "Alex Harui" <aharui@> wrote: > > > > > > Even headerRenderers get recycled. > > > > > > > > > > > > ________________________________ > > > > > > From: [email protected] > <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% > 40yahoogroups.com> > > > > [mailto:[email protected] > <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% > 40yahoogroups.com> > > ] On > > > Behalf Of markgoldin_2000 > > > Sent: Tuesday, May 06, 2008 2:23 PM > > > To: [email protected] <mailto:flexcoders% 40yahoogroups.com> > <mailto:flexcoders% > 40yahoogroups.com> > > > Subject: [flexcoders] Strange behavior > > > > > > > > > > > > I am trying to implement a checkbox as a headerRenderer: > > > public class CheckBoxHeaderRenderer extends CheckBox > > > { > > > private var _parentGrid:DataGrid = new DataGrid(); > > > public function CheckBoxHeaderRenderer() > > > { > > > super(); > > > selected = true; > > > addEventListener("click", clickHandler); > > > } > > > override protected function clickHandler > > > (event:MouseEvent):void > > > { > > > super.clickHandler(event); > > > parentGrid.dataProvider[0].processorder = 10; > > > } > > > public function set parentGrid(value:DataGrid):void > > > { > > > _parentGrid = value; > > > } > > > public function get parentGrid():DataGrid > > > { > > > return _parentGrid; > > > } > > > } > > > That works fine except that when I click on a checkbox it does > not > > > lose it "check" mark. Commenting out: > > > parentGrid.dataProvider[0].processorder = 10; > > > will resore checkbox's behavior. What am I missing? > > > > > > Thanks > > > > > >

