0

Can anyone say how I can expand and collapse treeColumn value in advancedGrid in Flex under a particular parent. I just want to expand and collapse only the children under a particular parent node in the grid. Thanks in Advance Vishnu

dan1st
  • 12,568
  • 8
  • 34
  • 67

1 Answers1

1

you can expand/collapse a specific item simply giving this statement to your adg:

adg.expandItem(<your_item>, !adg.isItemOpen(<your_item>))

your_item is the item of your dataProvider that you want to expand/collapse in your adg

marcocb
  • 241
  • 3
  • 10
  • Is there any way to know whether any item in advanced data grid is in expand or collapse state? – Vishnu Vikraman Sreekala Feb 13 '13 at 06:27
  • hi, i'm not sure to have understood your question. I try to answer: you colund write a boolean method which loops for each row of the dataProvider and makes this control: adg.isItemOpen(youDp.getItemAt(i)) == true....if you get all controls true this means that all items are expanded...obviously you can do the same control for the opposite case. Hope this helps...let me know! – marcocb Feb 13 '13 at 18:51
  • I will make it clear to you. I have an adg which have a tree structure (hierarchical). I want to know whether the item is in collapse (+) state or in expand state (-). – Vishnu Vikraman Sreekala Feb 14 '13 at 05:47
  • Once again thanks @marcocb. The above scenario worked for me. – Vishnu Vikraman Sreekala Feb 14 '13 at 11:04