Calculate DataGrid height

I have a dataset with more than 200 items. If I use that as dataprovider of a datagrid and set the rowcount to 10 the datagrid is not alway resizing to the right size. Sometimes I see 10.5 rows. This is a nice solution for that problem:

?View Code ACTIONSCRIPT
dataGrid.height = measureHeightOfItems(-1, dataGrid.rowCount) + dataGrid.headerHeight;
Vote or add to Uitleg over het gebruik van deze icons : Add/Vote on eKudos Add/Vote on NUjij Add/Vote on MSN Reporter Add/Vote on Digg Stumble it! Add this article to Del.icio.us Add to Furl Add to you favourites on Technorati Add to your Google bookmarks Subscribe for the RSS-feed of this site Send this page as e-mail through Feedburner Maak een notitie op deze pagina met Fleck

Related posts:



About this entry