[flexcoders] DataGrid - variableRowHeight=true and wordWrap=true not resizing properly

2009-02-09 Thread patrickfkellogg

I have a DataGrid that has dynamic columns (see below).  when i set
the DataGrid's variableRowHeight=true and wordWrap=true it resizes
tall and wraps just fine when a cell's contents are really long.

The problem is the next time the DataGrid appears when there is no
data to display it doesn't resize the row height to a normal row
height.  It remains at the previous really tall height.

The fix typically for this is to set the wordWrap=true in the
DataGridColumn tag and not in the DataGrid tag, but since i am
generating the columns dynamically, I can't do this.  Any one seen
this?  any fix?
thanks. pat kellogg 

 
mx:DataGrid
id=datagrid
width=100%
height=100%

dataProvider={report}
variableRowHeight=true
wordWrap=true
   
columns={DataGridColumnFactory.fromColumnGroupVOCollection(report.columns,
model.session.timezoneInfo)}
   
/



[flexcoders] DataGrid - variableRowHeight=true and wordWrap=true not resizing properly

2009-02-09 Thread patrickfkellogg
I have a problem with DataGrid that uses dynamically generated
columns.  When the cell has many characters the row resizes its height
properly with word wrap to show all the cell's contents.  But the next
time the DataGrid is shown when there is no data the row height
remains at the previous tall size.  It doesn't resize back down.  I
remember the fix for this before was to place the wordWrap=true in
the DataGridColumn tag not in the DataGrid tag, but this is not an
option since I am creating my columns dynamically.  anyone seen this?
 Any fix?  thanks.

 mx:DataGrid
id=datagrid
width=100%
height=100%
dataProvider={report}
variableRowHeight=true
wordWrap=true
   
columns={DataGridColumnFactory.fromColumnGroupVOCollection(report.columns,
model.session.timezoneInfo)} /



RE: [flexcoders] DataGrid - variableRowHeight=true and wordWrap=true not resizing properly

2009-02-09 Thread Alex Harui
If there's no data, set variableRowHeight=false and rowHeight to a reasonable 
number.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of patrickfkellogg
Sent: Monday, February 09, 2009 10:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid - variableRowHeight=true and wordWrap=true 
not resizing properly


I have a problem with DataGrid that uses dynamically generated
columns. When the cell has many characters the row resizes its height
properly with word wrap to show all the cell's contents. But the next
time the DataGrid is shown when there is no data the row height
remains at the previous tall size. It doesn't resize back down. I
remember the fix for this before was to place the wordWrap=true in
the DataGridColumn tag not in the DataGrid tag, but this is not an
option since I am creating my columns dynamically. anyone seen this?
Any fix? thanks.

mx:DataGrid
id=datagrid
width=100%
height=100%
dataProvider={report}
variableRowHeight=true
wordWrap=true

columns={DataGridColumnFactory.fromColumnGroupVOCollection(report.columns,
model.session.timezoneInfo)} /



Re: [flexcoders] DataGrid - variableRowHeight=true and wordWrap=true not resizing properly

2009-02-09 Thread A. Resa Jones (Resa)
Try measureHeightOfItems?

DataGrid.height = DataGrid.measureHeightOfItems(0, gridrows) +
DataGrid.headerHeight;


I added this event to my data source and called measureHeightOfItems in the
listChanged function:

report.addEventListener(CollectionEvent.COLLECTION_CHANGE, listChanged);




On Mon, Feb 9, 2009 at 1:36 PM, patrickfkellogg
patrickfkell...@yahoo.comwrote:

   I have a problem with DataGrid that uses dynamically generated
 columns. When the cell has many characters the row resizes its height
 properly with word wrap to show all the cell's contents. But the next
 time the DataGrid is shown when there is no data the row height
 remains at the previous tall size. It doesn't resize back down. I
 remember the fix for this before was to place the wordWrap=true in
 the DataGridColumn tag not in the DataGrid tag, but this is not an
 option since I am creating my columns dynamically. anyone seen this?
 Any fix? thanks.

 mx:DataGrid
 id=datagrid
 width=100%
 height=100%
 dataProvider={report}
 variableRowHeight=true
 wordWrap=true

 columns={DataGridColumnFactory.fromColumnGroupVOCollection(report.columns,
 model.session.timezoneInfo)} /