Thanks Matt... I will try this tomorrow though... I'm very tired now and not feeling well in my head :p . Just thought I would say thanks though
--- In [email protected], "Matt Chotin" <[EMAIL PROTECTED]> wrote: > > Why not bind the enabled property to a function? > > [Bindable(event="cbEnabledUpdate")] > private function cbEnabled(data:Object):Boolean > { > return //your logic here > } > > <mx:CheckBox enabled="outerDocument.cbEnabled(dataObject)" .../> > > Now when you're about to fire the service: > > dispatchEvent(new Event("cbEnabledUpdate")); > //do your thing > > When everything can fix itself dispatch that event again. > > Matt > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of sinatosk > Sent: Friday, March 17, 2006 7:30 AM > To: [email protected] > Subject: [flexcoders] Flex 2.0: Altering CheckBox inside a DataGrid from > the outside (outerDocument) > > I've done some searching but couldn't find much but what I basically > want is to change the "selected" property on a "CheckBox" from > outside the "DataGrid" I'll only post a snippet of it but if you > want the full thing... just ask ;)... I don't wanna make this post > look bloadted :p > > <mx:DataGridColumn headerText="Good" columnName="gameGood"> > <mx:cellRenderer> > <mx:Component> > <mx:HBox width="100%" horizontalAlign="center"> > <mx:CheckBox id="cb" selected="{dataObject.gameGood == 1 ? > true : > false}" click="outerDocument.show_cb()" width="15" height="14"/> > </mx:HBox> > </mx:Component> > </mx:cellRenderer> > </mx:DataGridColumn> > > I've tried to figure it out doing things in ActionScript like > > - "dg_games" is the id of the "DataGrid" > - "idx" is a variable inside the function "show_cb" in the > outerDocument > > > dg_games.dataProvider[ idx ].gameGood.cb.selected = true; > dg_games.dataObject[ idx ].gameGood.cb.selected = true; > dg_games.dataProvider[ idx ].dataObject.gameGood.cb.selected = true; > > and none of them work. Above is only an example of what I've tried. > > what I want to do in the long run is > > - Select the check boxe(s)that I want to change > > - After I press a button to get them updated. It disables all the > checkboxe(s) that I've changed and call to a "HTTPService" > > - When it recieves a response... it calls to the result handler > function and enables all those check boxe(s) again and applies the > new changes. > > I know how to do all of that except for changing the "selected" > property ( using ActionScript ) to the check boxe(s) which are in > a "DataGridColumn" and thats what I want to know :p > > thanks > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

