This Might Help you ... and is much better way then wraping header text

<mx:DataGridColumn  headerRenderer="HeaderRenderer" .....  />

//HeaderRenderer.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Label xmlns:mx="http://www.adobe.com/2006/mxml"; text="{data.headerText}" 
truncateToFit="true">
 
</mx:Label>

  ----- Original Message ----- 
  From: jmfillman 
  To: flexcoders@yahoogroups.com 
  Sent: Wednesday, June 11, 2008 11:00 AM
  Subject: [flexcoders] Re: DataGrid scroll size on data load


  I have horizontalScrollPolicy="on", which doesn't make a difference. 
  The field gets cut off whether on, off, or auto. My issue is knowing 
  how big to set the column, based on the data.

  My preference would be a column itemRenderer using a TextArea with 
  word wrap, but that doesn't appear to work either.

  --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
  >
  > You can set column sizes whenever you feel like it, but if you have
  > hScrollPolicy="off", the other columns may adjust since all columns 
  must
  > fit on screen under that policy. If you look in the archives, 
  several
  > folks have struggled with it. To determine the exact size for a 
  column
  > requires visiting every row in the data which is expensive so having
  > some other way is recommended. 
  > 
  > 
  > 
  > ________________________________
  > 
  > From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On
  > Behalf Of jmfillman
  > Sent: Tuesday, June 10, 2008 8:21 PM
  > To: flexcoders@yahoogroups.com
  > Subject: [flexcoders] DataGrid scroll size on data load
  > 
  > 
  > 
  > When I load data into a DataGrid, the right most field often gets 
  cut 
  > off. The column widths are set when the application loads. The 
  question 
  > is, how do I make it expand dynamically to adjust to the width of 
  the 
  > longest field in the column?
  >



   

Reply via email to