0 Replies Latest reply on Jun 30, 2011 7:01 AM by oziko

    Acces data from itemRenderer

    oziko Level 1


      I have an external itemRenderer whith a textInput contol for a dataGrid column and I want to acces to the textInput text from the main component class.


      My code : main component class

      <s:GridColumn id="price" dataField="NS" headerText="Cost" width="75"
                                            itemRenderer="composants.myRenderer.ComponentInput" />


      the itemRenderer :

      <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                          xmlns:mx="library://ns.adobe.com/flex/mx" clipAndEnableScrolling="true">
                  override public function prepare(hasBeenRecycled:Boolean):void {
                      //lblData.text = data[column.dataField]
          <s:HGroup horizontalCenter="0" verticalCenter="0" >
              <s:TextInput id="price" textAlign="center" width="70"/>



      and from my main component class :


      protected function onPrice( event:MouseEvent ):void {
                     trace( price.itemRenderer.price )


      but it doesn't works.

      If someone have an idea??