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):
<< 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 😉