Link to home
Start Free TrialLog in
Avatar of caherciveen
caherciveen

asked on

How can I make the columns of a flex datagrid resize to fit the content.

Hi,

I would like my Flex 3 DataGrid's columns to have a width that is equal to the width of the longest element in that column.   For example, an "id" column may have a width of 10 while a "description" column may have a length of 300...    

But, I want the datagrid to figure it out automatically based on the width it would need to be so that the contents of each column are fully shown.

Any ideas?
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

If i read your question right then have a look at VicOnFlex article here, I think this is your solution.....

http://viconflex.blogspot.com/2006/12/autosizing-datagrid-with-horizontal.html

If not say why and i'll come back
ASKER CERTIFIED SOLUTION
Avatar of zzynx
zzynx
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of caherciveen
caherciveen

ASKER

Perfect!
sorry, for the delay, I forgot about this question.  But this is an awesome function, zzynx
Thanx 4 axxepting
actually, when I implemented this function, it didn't work at all.  Literally, it chose completely wrong values for column width, cutting everything off.

I'm posting to the author to see what I'm doing wrong.