You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2016/10/18 15:36:47 UTC

disableAutoUpdate

when I sort on some columns I
do ArrayCollection(gird.dataProvider).disableAutoUpdate();. Should I at
some point enable it back?

Thanks

Re: disableAutoUpdate

Posted by mark goldin <ma...@gmail.com>.
Unfortunately, my sort is a column header click with a sortfunction.

On Tue, Oct 18, 2016 at 10:55 AM Clint M <cm...@gmail.com> wrote:

> var ac:ArrayCollection = grid.dataProvider as ArrayCollection
> if(ac) {
>   ac.disableAutoUpdate();
>   ac.sort = new Sort();
>   ac.sort.fields = ["name"];
>   ac.refresh();
>   ac.enableAutoUpdate();
> }
>
> On Tue, Oct 18, 2016 at 8:47 AM, mark goldin <ma...@gmail.com>
> wrote:
>
> > But how am I going to know that a sort is done and I can enable it?
> >
> > On Tue, Oct 18, 2016 at 10:42 AM Clint M <cm...@gmail.com> wrote:
> >
> > > ya... with enableAutoUpdate()
> > >
> > > On Tue, Oct 18, 2016 at 8:36 AM, mark goldin <ma...@gmail.com>
> > > wrote:
> > >
> > > > when I sort on some columns I
> > > > do ArrayCollection(gird.dataProvider).disableAutoUpdate();. Should I
> > at
> > > > some point enable it back?
> > > >
> > > > Thanks
> > > >
> > >
> >
>

Re: disableAutoUpdate

Posted by Clint M <cm...@gmail.com>.
var ac:ArrayCollection = grid.dataProvider as ArrayCollection
if(ac) {
  ac.disableAutoUpdate();
  ac.sort = new Sort();
  ac.sort.fields = ["name"];
  ac.refresh();
  ac.enableAutoUpdate();
}

On Tue, Oct 18, 2016 at 8:47 AM, mark goldin <ma...@gmail.com> wrote:

> But how am I going to know that a sort is done and I can enable it?
>
> On Tue, Oct 18, 2016 at 10:42 AM Clint M <cm...@gmail.com> wrote:
>
> > ya... with enableAutoUpdate()
> >
> > On Tue, Oct 18, 2016 at 8:36 AM, mark goldin <ma...@gmail.com>
> > wrote:
> >
> > > when I sort on some columns I
> > > do ArrayCollection(gird.dataProvider).disableAutoUpdate();. Should I
> at
> > > some point enable it back?
> > >
> > > Thanks
> > >
> >
>

Re: disableAutoUpdate

Posted by mark goldin <ma...@gmail.com>.
But how am I going to know that a sort is done and I can enable it?

On Tue, Oct 18, 2016 at 10:42 AM Clint M <cm...@gmail.com> wrote:

> ya... with enableAutoUpdate()
>
> On Tue, Oct 18, 2016 at 8:36 AM, mark goldin <ma...@gmail.com>
> wrote:
>
> > when I sort on some columns I
> > do ArrayCollection(gird.dataProvider).disableAutoUpdate();. Should I at
> > some point enable it back?
> >
> > Thanks
> >
>

Re: disableAutoUpdate

Posted by Clint M <cm...@gmail.com>.
ya... with enableAutoUpdate()

On Tue, Oct 18, 2016 at 8:36 AM, mark goldin <ma...@gmail.com> wrote:

> when I sort on some columns I
> do ArrayCollection(gird.dataProvider).disableAutoUpdate();. Should I at
> some point enable it back?
>
> Thanks
>