0 Replies Latest reply on Aug 1, 2008 3:17 PM by ilikeflex

    AdvancedDataGrid | totals | Hierachicalata

    ilikeflex Level 1
      Hi

      Is <mx:rendererProviders> tag inside <mx:AdvancedDatagrid> can be used with HierarchicalData only?????

      I am not using HierarchicalData and i want to show the totals in the grid. I have the xml in the format. But if i use the piece of code at bottom end then render is never executed.

      Can anybody explain me why is this hapening????????????????



      <employees>

      <totals>

      <salary>10000</salary>

      <employees>2</employees>

      </totals>

      <employee>

      <firstname>Rajan</firstname>

      <lastname>Jain</lastname>

      <address>India</address>

      <salary>1000</salary>

      </employee>

      <employee>

      <firstname>Rajan2</firstname>

      <lastname>Jain</lastname>

      <address>India</address>

      <salary>9000</salary>

      </employee>


      </employees>





      ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ -------------------------------------------

      <mx:XML id="employessDataBase" source="../database/database1.xml"/>


      <mx:AdvancedDataGrid x="46" y="44" width="552" dataProvider="{employessDataBase.employee}">

      <mx:columns>

      <mx:AdvancedDataGridColumn dataField="lastname" sortable="false" />

      <mx:AdvancedDataGridColumn dataField="firstname" sortable="false" />

      <mx:AdvancedDataGridColumn dataField="address" sortable="false"/>

      <mx:AdvancedDataGridColumn dataField="salary" sortable="false" />

      </mx:columns>


      <mx:rendererProviders>

      <mx:AdvancedDataGridRendererProvider

      dataField="employessDataBase.totals"

      columnIndex="1"

      columnSpan="4"

      rowSpan="1"

      renderer="learn.too.develop.renderer.showTotal"

      />

      </mx:rendererProviders>


      </mx:AdvancedDataGrid>

      ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ -------------------------------------------