1 Reply Latest reply on May 22, 2008 11:53 AM by fosrias

    AdvancedDataGrid and HierachicalData

    Vimpact Level 1
      I'm having a problem with the AdvancedDataGrid and HierachicalData. I have an HTTPService that is getting data from an XML file off the server. I have a comboBox that changes which data is currently displayed in an advancedDataGrid. The problem is that when I choose a different item in the comboBox the data is not changing in the advancedDataGrid. I'm using HierachicalData and setting it's source to the comboBox's data. Everything else on the page is updating fine when I change the comboBox. Any idea why the data grid wouldn't?

      <mx:AdvancedDataGrid>
      <mx:dataProvider>
      <HierachicalData source="{XML(posCombo.selectedItem).estimator.area}"/>
      </mx:dataProvider>
      <mx:columns>
      <mx:AdvancedDataGridColumn dataField="@name" headerText="Area"/>
      <mx:AdvancedDataGridColumn dataField="@wt" headerText="Weight"/>
      </mx:columns>
      </mx:AdvancedDataGrid>

      This is the XML...

      <position name="Manager">
      <estimator>
      <area name="1">
      <prod name="test1" wt="0.55"/>
      <prod name="test2" wt="0.65"/>
      </area>
      <area name="2">
      <prod name="test3" wt="0.45"/>
      <prod name="test4" wt="0.35"/>
      </area>
      <estimator>
      </position>
      <position name="Representative">
      <estimator>
      <area name="1">
      <prod name="test5" wt="0.24"/>
      <prod name="test6" wt="0.45"/>
      </area>
      <area name="2">
      <prod name="test7" wt="0.46"/>
      <prod name="test8" wt="0.75"/>
      </area>
      <estimator>
      </position>

      Thanks!