Hi Bill,

This is pretty simple to accomplish if you use ClassFactory to set up
your itemRenderers. You'll need to implement IFactory in your
itemRenderer class and then do something like this in the file where
your DataGrid lives:

[Bindable] private var myRenderer:ClassFactory;
myRenderer = new ClassFactory(MyAwesomeRendererClass);
myRenderer.properties = {externalObject: mainApp,
externalPropertyName: "buttonTwoEnabled"};

Then inside your IR class (where you've also declared public vars with
the same names as in the properties object) you could bind the
button's enabled property to externalObject[externalPropertyName].
This technique is explained in more detail here:
http://www.returnundefined.com/2006/11/creating-truly-reusable-renderers-with-classfactory/

HTH,
Ben


--- In flexcoders@yahoogroups.com, "bghoward3" <[EMAIL PROTECTED]> wrote:
>
> can someone point me in the right direction of retrieving a binded 
> vriable created in the main application from a itemrenderer located in 
> a datagrid?
> 
> i have a datagrid that contains an itemrender, the itemrender file 
> contains 2 buttons. based on the user id which is established in the 
> main application, one of these buttons may or may not be enabled
> 
> i have tried outerdocument and various iterations of parent 
> application and mx.core .... with no success
> 
> thanks in advance for any leads
>


Reply via email to