Jai’s Weblog – Tech, Security & Fun…

Tech, Security & Fun…

  • Jaibeer Malik

    Jaibeer Malik
  • View Jaibeer Malik's profile on LinkedIn
  • Subscribe

  • Feedburner

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 32 other followers

  • Archives

  • Categories

  • Stats

    • 412,782
  • Live Traffic

  • Advertisements

Tips&Tricks: Flex expand AdvancedDataGrid tree column on load

Posted by Jai on August 18, 2009

Use displayExpandItems=”true” to expand all the elements of the tree component items on initial load.

<mx:AdvancedDataGrid groupItemRenderer="com.test.CheckBoxTreeRenderer"
	 			<mx:AdvancedDataGridColumn id="labelColumn" dataField="label" headerText="Data"/>

The problem with expandAll() to be called on creation is that the model may not be updated at that moment.


8 Responses to “Tips&Tricks: Flex expand AdvancedDataGrid tree column on load”

  1. Sasha Dzeletovic said

    Thanks Jai!
    I had the exact same problem with expandAll(). This is an efficient shortcut.

  2. Robertus said

    Nice article. I have problem in expanding tree on load. Thanks

  3. Chuck said

    Thanks this is very helpful

  4. Oswaldo said

    Thanks! Simple but effective

  5. Hichem Ben Abdallah said

    Hi Jai,

    You can use the method “callLater” to guarantee that all nodes will be expanded at the right moment.

  6. Ahmed Malik said

    Hey Jaibeer

    Thank you for the great info. This helps expanding but later collapseAll() doesn’t work at all. Any idea how that can be made to work too?

    Best regards,
    Ahmed Malik.

  7. Ahmed Malik said

    Got it… you need to have


    before… collapseAll();


    Best regards,

  8. mathi said

    help me pls….
    In advanced datagridcolumns i need to expand particular row after edit or new node to save…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: