2 Replies Latest reply on Nov 19, 2010 12:38 AM by sphinks1

    Clearing DataGrid.

    sphinks1

      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)?