I made a DataGrid with a custom GridItemRenderer. Look here.
I add one GridColumn then 2 items in the DataProvider with the addItem function, I specify the rowHeight but there is one unexpected little row at the end of the column. And i really don't know why, if someone have an idea.. I tried modifying the RequestedRowCount property too, but without success. I also looked in debug mode, there is only two items in the list.
My DataGrid :
<s:DataGrid id="datagridGPTGauche"
width="130"
skinClass="fr.eram.skins.CustomDataGridSkin"
textAlign="center"
dataProvider="{dataProviderGridGPTGauche}"
initialize="onInitializeDatagridGPTGauche(event)"
editable="false"
rowHeight="26"
resizableColumns="false"
selectionMode="none"
sortableColumns="false"
requestedRowCount="2"
>
Thanks !
You have not specified a Height on your DataGrid definition and I think you are getting confused about how a DataGrid displays its data.
By default the height of the DataGrid, if you are using a rowHeight=26, will be just enough space to show the column header row, 2 rows of data, and a little bit of the 3rd row of data.
With the following Application definition:
We can see the output in IE as follow:
If we increased the height of the DataGrid, to say 150, we can actually see that the DataGrid creates "blank" rows even when no data is present and always creates a partial row if the height is not great enough to show a full row:
Your options are: