Did you mean like this? super.dataProvider = value; ArrayCollection(dataProvider).filterFunction = watchListFilterHiddenAssets; ArrayCollection(dataProvider).refresh();
That did not change anything. On Tue, Mar 15, 2016 at 12:07 PM Alex Harui <[email protected]> wrote: > Calling super.dataProvider will probably reset the DG. I think most folks > assign dataProvider and then filter later. > > -Alex > > On 3/15/16, 9:45 AM, "mark goldin" <[email protected]> wrote: > > >I have to filter a dataProvider of an ADG. As soon as I refresh() to see > >changes DataGrid is reset. All columns have lost their custom layout. > >What's the best way of handling that problem? > > > >Here is my code: > >override public function set dataProvider(value:Object):void > >{ > >if (value) > >{ > >addEventListener("AlarmManagementImagesLoaded", > >loadAlarmManagementImages); > >ArrayCollection(value).filterFunction = watchListFilterHiddenAssets; > >ArrayCollection(value).refresh(); > >super.dataProvider = value; > >} > >} > > > >Thanks > >
