11 Replies Latest reply: Apr 21, 2008 9:12 AM by angie_mc RSS

    How to get AdvancedDataGrid ItemRenderer for hierarchal column to work

      I have an advanced datagrid with 5 columns one of which is a hierarchal (tree). This datagrid is populated by the following:
      MyAdvancedDataGrid.dataProvider = new HierarchicalData(MyXMLListCollection);

      The first column is the tree and im trying to do a item renderer on it in actionscript... I have the following code:
      MyTreeColumn.itemRenderer = new ClassFactory(MyRenderer);

      In order to get the icon and label to show up i need to extend AdvancedDataGridGroupItemRenderer as such:
      MyRenderer extends AdvancedDataGridGroupItemRenderer

      This has one problem... the updateDisplayList function only gets fired for the children not the root rows... So if you set the this.icon.visible = false... the icon will show up on the root rows but the most bottom children rows the icon will become invisible...

      Now ... if i extend the class with AdvancedDataGridItemRenderer then the tree functionality gets overwritten and it doesn't function the way that I need it to.. Ultimately I'm trying to shift the default label over so I can add another icon to the right of the the default icon so the user can click on it... Any help from anyone would be greatly appreciated...