Yes, I figured that out for dates etc... based on their formatting.

For numerical values, I was thinking of using temporary sorting in
order to get the biggest value without looping. Of course, sorting
involves looping but there are optimized algorithms. Hopefully, the
Sort() of the flex framework is optimized enough.



--- In flexcoders@yahoogroups.com, "Doug McCune" <d...@...> wrote:
>
> But doing some pretty simple calculations based on data type is
easy. For
> example, if you know a field is a date and you want to display the
full date
> and time string, you know how wide that needs to be. Or if a field is a
> phone number, etc. Unknown strings present problems, but maybe just some
> simple stuff would be better than nothing at all?
> 
> Doug
> 
> On Thu, Jan 8, 2009 at 5:04 PM, Tracy Spratt <tspr...@...> wrote:
> 
> >    No, to size a column to the widest content, the datagrid would
have to
> > read and compute the size for every field in every record.  This
would be
> > impossible for large datasets.
> >
> >
> >
> > Tracy Spratt
> > Lariat Services
> >
> > Flex development bandwidth available
> >   ------------------------------
> >
> > *From:* flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] *On
> > Behalf Of *k.sigiscar
> > *Sent:* Thursday, January 08, 2009 3:56 AM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* [flexcoders] Datagrid columns autosize
> >
> >
> >
> >
> > Hello,
> >
> > I was wondering if somebody had a solution for sizing automatically
> > the width of datagrid columns based on their content.
> >
> > I have seen some implementations but none are satisfactory in terms of
> > performance/stability.
> >
> > Thanks,
> > Karl.
> >
> >  
> >
>


Reply via email to