1 Reply Latest reply on Nov 15, 2008 5:39 AM by Newsgroup_User

    custom event from itemeditor

    phil1943 Level 1
      Hello, I have a datagrid with a custom itemEditor inside one of the columns (a custom textInput).
      I want to dispatch an event that the parent datagrid can receive, when the value of this textInput is changed, .

      This is how I have defined my itemEditor in the parent DataGrid's DataGridColumn:
      <mx:DataGridColumn headerText="Quantity" editable="true" itemEditor="myTextInput" width="63" dataField="Quantity" />

      Here is the instantiation line of my custom TextInput that defines a CHANGE event listener:
      <mx:TextInput xmlns:mx=" http://www.adobe.com/2006/mxml" addedToStage="{addEventListener(Event.CHANGE,functionToCall)}">

      That all works fine, but I cannot figure out how to get the parent datagrid to receive notification of this change ?

      Thanks kindly for any help.


        • 1. Re: custom event from itemeditor
          Level 7

          "phil1943" <webforumsuser@macromedia.com> wrote in message
          news:gflfep$ons$1@forums.macromedia.com...
          > Hello, I have a datagrid with a custom itemEditor inside one of the
          > columns (a
          > custom textInput).
          > I want to dispatch an event that the parent datagrid can receive, when the
          > value of this textInput is changed, .
          >
          > This is how I have defined my itemEditor in the parent DataGrid's
          > DataGridColumn:
          > <mx:DataGridColumn headerText="Quantity" editable="true"
          > itemEditor="myTextInput" width="63" dataField="Quantity" />
          >
          > Here is the instantiation line of my custom TextInput that defines a
          > CHANGE
          > event listener:
          > <mx:TextInput xmlns:mx=" http://www.adobe.com/2006/mxml"
          > addedToStage="{addEventListener(Event.CHANGE,functionToCall)}">
          >
          > That all works fine, but I cannot figure out how to get the parent
          > datagrid to
          > receive notification of this change ?

          http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
          Q3