views:

36

answers:

1

Hi, I have three datagrids inside VBox container. Since I don't want scrollbar in my flex widget i am increasing the height of SWF through javascript, which increases with each addition of row in my datagrid. My query is how can I get the exact height of my VBox which is the parent element of datagrid. I am not able to get the height of VBox. I have tried to use measuredHeight,height with no success. Could anybody please suggest me the way out for the same.

Thanks in advance!!!

A: 

vbox.height should give you theheight of the DataGrid.

www.Flextras.com
no.. it is not giving me the exact height.. may be because my vbox does not have 100% height...
shruti
Can you provide a code sample? I'd be very surprised that vbox.height is not giving you the height of the VBox.
www.Flextras.com
i have analysed it again. actaully it is giving me the height but not the updated one, it is giving me the older height... i am adding item in one grid one by one , i m checking the height of its parent when the item is added into grid but still it shows me the immediate older height.. so could you tell me how i can get the updated height...
shruti
What is giving you the height but not the updated one? How / when is the height updated? And how are you accessing it? What is it's parent? How are you changing the height? Perhaps you need to make use of the component lifecycle and check the new height on updateComplete?
www.Flextras.com
hey thanks alot !! it worked... checking height at updateComplete worked! thanks again!
shruti
Glad that helped!
www.Flextras.com