Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flex 4.5 (Hero) s:Datagrid RowCount

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

like image 832
Paulo Ans Avatar asked May 05 '11 15:05

Paulo Ans


2 Answers

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.

like image 181
Stefan Mihai Stanescu Avatar answered Nov 05 '22 19:11

Stefan Mihai Stanescu


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.

like image 20
Ped Avatar answered Nov 05 '22 21:11

Ped