1 Reply Latest reply on Jul 10, 2009 11:49 AM by _Natasha_

    How to use an array defined in the main Script Block in a InlineCode Block of a DataGridColumn itemRenderer ComboBox?

    ma.tze Level 1

      Hi,

       

      How can I use an array defined in the main Script Block in a InlineCode Block of a DataGridColumn itemRenderer ComboBox?

       

      Thanks for any help!

       

      Martin Zach

       

      I hope the Code shows my problem:

       

       

      <fx:Script>

                  <![CDATA[

                        private var myArrayOut:Array=new Array("one out","two out","three out");

      </fx:Script>

      ...

      Datagrid...
          <mx:DataGridColumn headerText="myColumn" dataField="myColumn" rendererIsEditor="true"
              <mx:itemRenderer>
                  <fx:Component>
                        <mx:ComboBox creationComplete="init()">
                          <fx:Script>
                              <![CDATA[
                                  private var myArrayIn:Array=new Array( "one in", "two in", "three in");
                                 
                                  private function init():void{
                                     
                                      this.dataProvider=myArrayIn; // How can I use myArrayOut here???
                                  }
                              ]]>
                          </fx:Script>                                                               
                      </mx:ComboBox>
                  </fx:Component>
              </mx:itemRenderer>
          </mx:DataGridColumn>