Hello all. I have a data gird which I fill like this:
var raiting:ArrayCollection = new ArrayCollection(raitingAr);
raitingGrid.dataProvider = raiting;
So data I want to display is located in Array raitingAr. In its order raitingAr fill from remote server, so it updates dinamycly. When I resive another data it`s refresh correctly in this code, but if there was data in datagrid and on refresh come empty array, datagrid still show previous values. How can I adapt datagrid to show any data correctly (when there is any rows in array show it in datagrid, when there is no rows in datagrid - clear datagrid)?
check raitingAr before creating arraycollection from it.
you can pass a count item from server-side to flex.
if(count == 0)
var raiting:ArrayCollection = new ArrayCollection()
No, this is useless condition. Data grid will correctly work with empty array. I have found error in the other place. Thanks.