Try requestedMinRowCount. Make sure you do not set requestedRowCount and the datagrid's height.
Thanks for your rely Kevin,
In the Code (Project fxp provided [ http://www.yozef.com/files/DataGridScaler.fxp.zip ] (just rename without .zip) You will see that the ExpandableDataGrid.mxml you will see on ceration complete the requestedMinRowCount is set. I have removed requestedRowCount.
The Problem is on Scaling the Grids, as mentioned in the question above. I figured the Image above would help also in showing the desired effect.
I'm assuming the usage of scaleX and scaleY would come into play, as seen in one of ExpandabledataGrid examples.
With your code, the DataGrid indeed does stay in view. So, you want it to completely fill the screen too?
In the Code provided, if I resize just vertically for example... it dosen't rescale (fonts reduce).
I am thinking the best way is to actually use scaleX & scaleY.
Though thats where I'm having trouble and need to find the solution. As the Parent resizes, the grids scale (inward or outward) so as to keep all rows & columns in view.
This was solved by Flex harUI by adding the Daragrids into a Layout of a Group.
The Layout class:
public class ScaleOneLayout extends BasicLayout
public function ScaleOneLayout()
override public function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
child = target.getElementAt(0) as UIComponent;
child.scaleX = unscaledWidth / child.width;
child.scaleY = unscaledHeight / child.height;