you might get a better response on the flex forum but when you say not working what do you mean?
I have just ran your code and get 9 rows, are you aware you only have 8 rows of data
when i ran the above code i get total 12 rows from which 8 are filled and 4 are blank.
I want to get rid of blank rows.
I expect that's something to do with the datagrid height. the row count is still 9 if you trace it out
if the height of the datagrid is more that the data can fill I expect you get the extra rows displayed.
if you launch your application and resize it smaller you will notice you don't see these extra rows.
depending on what you are trying to achieve you may have to listen to the change event of datagrid and manually resize the datagrid's height as the sum of the row heights
simply removing the height="100%" might also achieve what you are after