An item renderer is a component and has its own scope.  "outerDocument" is a
reference to the renderer's parent document.  You use it to access public
properties of the parent.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Nick Middleweek
Sent: Thursday, October 15, 2009 7:17 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] Re: [Spam] Re: [flexcoders] Checkbox in Datagrid

 

  

Hey Angleo,

Just curious here but what's the outerDocument. prefix for on the change




2009/10/15 Angelo Anolin <angelo_anolin@ <mailto:angelo_ano...@yahoo.com>
yahoo.com>

  

Agha,

 

You need to use Itemrenderer to render your checkbox control inside your
gridview:

 

<mx:DataGridColumn headerText="Testing" width="100" textAlign="center">

  <mx:itemRenderer>
    <mx:Component>
      <mx:CheckBox label="Test" change="outerDocument.checkbox_changed()" />
    </mx:Component>
  </mx:itemRenderer>
</mx:DataGridColumn>

 

and then in your script section, declare a function (i.e.
checkbox_changed())

 

public function checkbox_changed() :void
{
  Alert.show('Test');
}

When you check/uncheck your checkbox on the datagrid, the alert message
should show.

 

I hope this helps.

 

Angelo

 

 

 



Reply via email to