Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 336847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:16:50+00:00 2026-05-12T10:16:50+00:00

I’d like to put a TreeGrid in my application so that the columns can

  • 0

I’d like to put a TreeGrid in my application so that the columns can be sorted. If you refer to this sample application, you’ll notice that if you

  1. Open a branch node
  2. Sort by one of the columns
  3. Close that branch node

then the TreeGrid starts to get out of wack and duplicate columns start appearing and other columns start disappearing. What I would like is to have the columns sorted only by the outermost nodes.

One attempt I had was to run treeGrid.closeAllItems() before the sort occurred. However, this does not work, because a Sort Column event gets dispatched while closeAllItems is running, so the list gets messed up and listOutOfBounds exceptions get thrown.

Has anyone had any success with this, or have any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:16:51+00:00Added an answer on May 12, 2026 at 10:16 am

    Here is a piece of working code

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    
    <mx:Script>
        <![CDATA[
            import mx.collections.HierarchicalData;
    
        ]]>
    </mx:Script>
    
       <mx:XMLList id="dataProviderXMLList">
            <node id="1" name="Companies" type="COMPANIES" desc="All Companies" statusIcon="statusIcon">
                <node id="2" name="Adobe" type="COMPANY" desc="Adobe inc." statusIcon="statusIcon">
                    <node id="5" name="Adobe Consulting" type="COMPANY" desc="Adobe (formerly macromedia)" statusIcon="statusIcon" />
                    <node id="6" name="EDBU" type="COMPANY" desc="Database company" statusIcon="statusIcon" />
                </node>
                <node id="3" name="Macromedia" type="COMPANY" desc="Adobe (formerly macromedia)" statusIcon="statusIcon" />
                <node id="4" name="Oracle" type="COMPANY" desc="Database company" statusIcon="statusIcon" />
            </node>   
        </mx:XMLList>
    
        <mx:AdvancedDataGrid width="100%" height="100%" sortExpertMode="true" id="adg1" designViewDataType="tree" dataProvider="{new HierarchicalData(dataProviderXMLList)}">
            <mx:columns>
                <mx:AdvancedDataGridColumn headerText="Companies" dataField="@name"/>
                <mx:AdvancedDataGridColumn headerText="COMPANIES" dataField="@type"/>
                <mx:AdvancedDataGridColumn headerText="All Companies" dataField="@desc"/>
            </mx:columns>
        </mx:AdvancedDataGrid>
    
    </mx:Application>
    

    Bu this is using AdvancedDataGrid and it works perfectly fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.