Posted 24 November 2017, 6:07 am EST
I am trying to apply flex gridfilters stored in localstorage but it’s not working.Please find the approach below in angularjs. Let me know the correct way of doing this.
html :
<wj-flex-grid
control="flex.grid"
style="height:300px"
initialized="initialized(s, e)"
items-source="flex.data">
<wj-flex-grid-filter control="flex.filter"></wj-flex-grid-filter></wj-flex-grid>
JS:
app.controller('appCtrl', function ($scope) {
$scope.flex={grid:null,
flex:null,
data:[]
};
$scope.initialized = function (s, e) {
$scope.filter.filterDefinition = localStorage['filter'];
}
someapicall.then(function(data){
$scope.flex.data = new wijmo.collections.CollectionView(data);
//I have tried updating the sourceCollection as seen in some posts but not
working
[i]$scope.flex.data.sourceCollection= data;
$scope.flex.data.refresh();[/i]
}
Thanks