views:

1155

answers:

1

HI,

i want to build a datagrid which will have a dynamic height value because the number of rows will always be different. I also want to communicate the height back to the component holiding it so that it also grows with the datagrid. Can anyone help me out on the best way to create such a dynamic datagrid.

Thanks

A: 

Can you be more specific? Are you saying you don't want the datagrid to scroll? What about cases where the number of rows exceeds what can be seen on screen? -- Once you answer those questions, I can edit this to be a more specific answer.

As for communicating from your custom DataGrid implementation up to the parent object, what you want to do is broadcast an event indicating that the height should change, and attach some value -- the number of rows or the new height, probably -- to that event.

After learning the basics of event broadcasting in Flex, I realized they were way overcomplicated and learned the Swiz framework, which makes event Broadcasting and Handling about as simple as they could possibly be (among several other awesome things).

Adam Tuttle
hey Adam, i asked this question earlier but wasnt logged in. I just want the datagrid to grow/shrink based on the rows. If number of rows exceeds what can be seen on the screen then i guess scroll is best option? thanks
combi001