What is happening is that i have this datagrid displayed on a canvas. The dataprovider is binded to a data sampleDat.
I click a button and in the event handler for the click i reassign the dataprovider to new ArrayCollection(); which is empty. Now when i look at the datagrid there is previous data still visible in the datagrid. on another click i assign sampleData2 to the datagrid which over- wrights on the previously visible data and is all craped out. Another thing i noticed while performing different tests is that if the reassigning data has more rows than the previous data then it all works fine. The datagrid works fine in panel or anyother container. Also this is not issue with flex as this datagrid and canvas are slightly modified of the original version. So probably something i am doing wrong. Either the canvas or the datagrid needs to be repainted. I know this is hard to understand but any help is appreciated. I have working on this from last 2 days and have no clue on what can be done. Not even sure if this is canvas problem or datagrid problem. thanks for the reply. gur_sukh --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Not sure what you mean by "clear" and why you think refresh() would > help. Please provide more detail. > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of gur_sukh > Sent: Thursday, September 27, 2007 2:01 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] DataGrid in flex 2.0 > > > > When reassigning data to dataprovider the old data doesn't clear. So > there is overwriting. Anyone know how to fix this. refresh() doesn't > work. > > gur_sukh >