3 Replies Latest reply on Jun 5, 2009 7:07 AM by *Prashant Shelke*

    dataColumn question

    Zolotoj Level 3

      Trying to make this code working:

      <mx:DataGridColumn

       

       

      headerText="Name

      "

      width="

       

      {accounts.width*.9}

      "

      dataField="

       

      ccompany"

      >

       

       

      <mx:itemEditor>

       

       

      <mx:Component>

       

       

      <modulecode:comboItemRenderer creationComplete="salesRepsAccounts()">

       

       

      </modulecode:comboItemRenderer>

       

       

      </mx:Component>

       

       

      </mx:itemEditor>

       

       

      </mx:DataGridColumn>

       

      I am getting:

      1180: Call

       

      to a possibly undefined method salesRepsAccounts

       

      Also I was trying to set an ID property on comboItemRenderer but it's not workin either.

       

      My question is can I make what I am trying to do work or I need to take AS route?

       

      Thanks

        • 1. Re: dataColumn question
          dzeikei Level 2

          The code inside the <mx:Component> is not part of this component.

           

          try calling TheOuterComponent(outerDocument).salesRepsAccounts() instead

          • 2. Re: dataColumn question
            Zolotoj Level 3

            A, I see.

            What about an ID for that component? How salesRepsAccounts will actually assign data to it?

            • 3. Re: dataColumn question
              *Prashant Shelke* Level 4

              If u want to access control in scope of component,


              <mx:Component>
                         <mx:HBox width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" horizontalAlign="left" >
                                     <mx:Script>
                                                   <![CDATA[

                                                        Here, you can write any AS function...

                                                     ]]>
                                     </mx:Script>

                                      < renderer Comp />


              Thanks.