> "...im only changing the data in the grid..." No, you are not. You are > changing the data in the dataProvider.
Yes correct i am changing the DG dataprovider is what i meant, im using an httpservice dataprovider, let me know if this helps --- In [email protected], "Tracy Spratt" <tspr...@...> wrote: > > The source of the data is irrelevant. setItemAt() is a method of the > *collection*, and can be used with any collection. > > > > What is the data type of the DG dataProvider? What error are you > getting? > > > > "...im only changing the data in the grid..." No, you are not. You are > changing the data in the dataProvider. When you loop to build your > server update data, you will be working with the dataProvider. > > > > Tracy > > > > ________________________________ > > From: [email protected] [mailto:[email protected]] On > Behalf Of Jason B > Sent: Monday, January 05, 2009 4:39 PM > To: [email protected] > Subject: [flexcoders] Re: Slow datagrid updates > > > > Thanks > To show the example i used an Array collection but in reality im using > httpservice populating the grid. > So would setItemAt() still work > > your code works perfect for Array example but i get an error on > setting the httpservice dataprovider > search_cert_refund_dataprovider.setItemAt(oSelectedItem,iIndex); > > remember im only changing the data in the grid so i can later loop it > to post back to my code. > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> > , "Tracy Spratt" <tspratt@> wrote: > > > > It is not taking a long time to display, it will never display. > > > > > > > > The problem is with the way you are updating the dataProvider. > Directly > > setting a property on an item does not dispatch the necessary events > to > > cause the DG to update. The two ways to do this are, 1, use the > > collection API, which in this casw would be setItemAt() or 2, call > > itemUpdated(). > > > > > > > > Here is an example of the first: > > > > var oSelectedItem:Object = mc_searchrefund_grid.selectedItem; > > > > oSelectedItem.DATA2 = "NOT PRESENT"; > > > > var iIndex:int = mc_searchrefund_grid.selectedIndex; > > > > testdata.setItemAt(oSelectedItem,iIndex); > > > > > > > > Here is an example of the latter: > > > > ... > > > > mc_searchrefund_grid.selectedItem.DATA2 = "NOT PRESENT"; > > > > testdata.itemUpdated(mc_searchrefund_grid.selectedItem,"DATA2"); > > > > > > > > Tracy > > >

