To use requestedRowCount, You Should NOT set a Height to the DataGrid.
When you set variableRowHeight to false, if one of the rows is bigger than the other, all other rows will take that row heights size (leaving some white space for some cells don't necessarily need it). Set it to true otherwise.
My Problem is Scaling that Grid http://forums.adobe.com/thread/918067
Thanks for the reply. I do not have any value set for Height.
Does anyone have a solution for this? I have exactly the same problem.
Datagrid with requestedRowCount="-1" and variableRowHeight="true"
No issue with autoexpanding the grid - and no issue with autoexpanding the row height with word-wrapped text.
But when combined - a grid that has 5 elements in dataprovider will only show 3 - if one row has been expanded to handle the word-wrapped data.
Is it possible to count the rowheights and override the measure function with minheight or measuredminheight?
Or do I need to call something other than invalidateDisplayList after dataprovider changes?
Any suggestions or sample code would be welcomed.
I believe if you don't specify a typicalItem the height of the first row is multiplied by the number of requested rows. This means that if the height of the first row is less than the height of any of the other rows not all the rows will be shown.
Sounds right - but how to get around that? Specifiying a typical item won't change the result, if one or two rows have multiple wrapped lines in them.
The way I got around it for now anyways was to go thru the dataprovider's array - looking thru the column's data for each row - and setting the minrequestedrowcount to the length of the array multiplied by a factor of extra lines found.
Not sure how it'll work with wrapped text, but works for now