Stuck in the AdvancedDatagrid

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Stuck in the AdvancedDatagrid

    Hi All,

    I want to access the data within the Advanced Datagrid but I cant seem to do
    it. I have defined some summary data using Grouping Collections and a summary
    row. Now I want to use that data to do something else.

    I have found that the advancedDataGrid has a property called
    HierarchicalCollectionView and HierarchicalCollectionView has a property called
    treeData. Whilst treeData has the data that I want to use (summaries of my
    leaf level data), unfortunately it is a protected property so I cant refer to
    it using code. In the debugger you can see it with a little yellow diamond
    next to it.

    I am trying to figure out whether I can use inheritance or maybe composition
    in Actionscript to get the contents of treeData but everything I have tried has
    failed so far.

    Alternatively is there another way of getting to that data?

    BaliHi Guest

  2. Similar Questions and Discussions

    1. Question for AdvancedDataGrid?
      Hi, I did a AdvancedDataGrid without grouping,it works fine. <mx:AdvancedDataGri d x="8" y="72" width="558" height="247" rowCount="4"...
    2. AdvancedDataGrid and HierarchicalData
      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...
    3. AdvancedDataGrid Sorting
      I'm having a problem getting an AdvancedDataGrid to sort data in the proper order. I'm using a GroupingCollection as the dataprovider and I have...
    4. Could not resolve <mx:AdvancedDataGrid>
      hi, all, I don't have much experience on Flex, and I met this problem when I try to open my mxml on Tomcat: Could not resolve...
    5. CFC Query - stuck, stuck, stuck
      I am once again trying to use Dreamweaver. Here I want to create my first CFC. I'm following the online tutorial Building Your First Database...
  3. #2

    Default Re: Stuck in the AdvancedDatagrid

    You can use the iterator of HierarchicalCollectionView and get to the summary nodes. (You may have to open all the nodes if you want to proces all summary nodes)
    Sreenivas R Guest

  4. #3

    Default Re: Stuck in the AdvancedDatagrid

    Thanks, that looks like it will work but can you give me some more information
    on how I would iterate through the HierarchicalCollectionView?

    I can see that after opening all the nodes,
    HierarchicalCollectionView.OpenNodes becomes an object with child objects that
    contain all the information I need. I can get the length of
    HierarchicalCollectionView, but how do I refer to the individual nodes below?
    Here is some code that doesnt work - maybe you can provide a quick correction
    or a re-write:

    var myHierCollView:IHierarchicalCollectionView =
    dgVwFinData.hierarchicalCollectionView;
    //open all the nodes
    dgVwFinData.expandAll();

    //loop through the HierarchicalCollectionView
    for(var i:int=0; i<myHierCollView.length; i++)
    {
    //how do I access the individual items in myHierCollView
    //the following doesnt work
    var currentNode:Object = myHierCollView[i];
    }


    BaliHi Guest

  5. #4

    Default Re: Stuck in the AdvancedDatagrid

    You need to call myHierCollView.createCursor() and use the IViewCursor returned.

    while(!cursor.afterLast)
    {
    var node:Object = cursor.current;
    cursor.moveNext();
    }

    Sreenivas R Guest

  6. #5

    Default Re: Stuck in the AdvancedDatagrid

    Thanks Sreenivas R, you're a top man
    BaliHi Guest

  7. #6

    Default Re: Stuck in the AdvancedDatagrid

    Thanks a lot Sreenivas !!!

    I have used the same logic for Export to excel functionality. It worked fine. But, I am unable to get my Group names in the excel sheet.

    Any help would be great.

    Thanks once again.
    Rekha Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139