RE: [flexcoders] DataGrid - variableRowHeight=true and wordWrap=true not resizing properly
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
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)} /