1 Reply Latest reply on Jun 18, 2008 8:13 AM by CF_crazee

    dataprovider and datachange event

    CF_crazee
      Here is my combobox

      [code]
      <mx:ComboBox id="gringx_" dataProvider="{this._dsgpolyx.gringx_}" labelField="gringxID" dataChange="SelectGringx(event)"/>
      [/code]


      dsgpolyx is a property of the component

      [code]
      [Bindable]
      private var _dsgpolyx:dsgpolyxVO;
      [Bindable]
      public function get dsgpolyx() : dsgpolyxVO
      {
      return _dsgpolyx;
      }

      public function set dsgpolyx(value:dsgpolyxVO):void
      {
      _dsgpolyx = value;
      }
      [/code]


      Now if the value of dsgpolyx changes from elsewhere (parent component) by using

      [code]
      var currDsgpolyx : Dsgpolyx = dsgpolyxCanvas.getChildAt(0) as Dsgpolyx;
      currDsgpolyx.dsgpolyx = this.dsgpolyx_.selectedItem as dsgpolyxVO;
      [/code]

      where Dsgpolyx is the component mentioned above which contains the combobox , why doesnt the datachange event trigger? What am I doing wrong?

      I need an event to trigger whenever the dataprovider and hence the data changes , where do I do this?