Technically you would iterate through the dataprovider and measure the
text/renderer forthe appropriate column.  Note that if you have large
numbers of items this will be expensive.  It is often better just to
guess at a number or "know" the longest string

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of wwwpl
Sent: Wednesday, November 28, 2007 2:05 PM
To: [email protected]
Subject: [flexcoders] Re: DataGrid Column Width is not The Content
WIdth. How do you make it the same



Could you spell that out just a bit more? I have tried to access the
children in the datagridcolumn, but have not found it to be straight
forward. Thanks.

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> measure the children and set the width accordingly
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of wwwpl
> Sent: Wednesday, November 28, 2007 11:09 AM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] DataGrid Column Width is not The Content WIdth.
> How do you make it the same?
> 
> 
> 
> DataGrid column widths are set to a default of 100. That means it
> won't size to it's children. It is very annoying. Does anyone have a
> work around?
>



 

Reply via email to