Ok, just going nuts with this one.
I used rowcount, in my previous mx.datagrid
Now, with "s:datagrid", I've tried to use requesteMaxRowCount, and RequestMinRowCount (in desperation mode :/ )
The datagrid appear with 2 lines, even when my dataset only has ONE row, and
requestedMaxRowCount = 1;
---edited ---
arrBranches is an ArrayCollection
if (arrBranches.length > 0){
dgBranches.requestedMaxRowCount = arrBranches.length;
dgBranches.dataProvider = arrBranches;
dgBranches.visible = true;
arrBranches.refresh();
}
--- edited end---
--- 2nd edit ---
this is not possible anymore...
dgBranches.rowCount = arrBranches.length
-- Edit end --
I have no height, top, or bottom, defined... how to set the visible rows to only One row (other than header, of course) Paulo Ans
You need to set the minHeight property of your DataGrid to "0" or anything smaller than the header height.
The default minHeight is just enough to show a little over 2 rows, hence your problem.
I ran into this same problem/bug:
my hack-workaround is to toggle the dataGrid's height to a fixed value (55 works in my rendering) when the dataProvider has only 1 row.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With