DataGrid doesn’t update rowCount correctly

I have an Bindable ArrayCollection with values and DataGrid that should show all the values (or rows) without the ugly scrollbars (I hate scrollbars). This is working correct by setting the rowCount property in DataGrid like this:  rowCount = "this.ArrayCollection.length"
the tricky part is when you add items to that ArrayCollection on application run. Somehow the rowCount is only updated once in the 2 times. I Made a example that is making it clear where it goes wrong (and rightclick –> source view gives you the opportunity to see the source):

This movie requires Flash Player 9
.
<< view source >>

If you select the checkbox “first reset rowCount to 1″ you see that it is working correct again. If you check this the rowCount of the DataGrid is set to 1 (because 0 is setting the rowCount standard to 7) and immediately after that i’m doing this again: rowCount = "this.ArrayCollection.length". I also tried to just set the ArrayCollection.length to the rowCount but this still gives the wrong behavior.

I hope this helps someone to not waste 2 hours searching for the solution like me ;)

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