Posted 29 April 2020, 1:45 pm EST
Hi Ashwin,
After placing the above code fix, I’m getting other issues like after applying the column filter, if I try to sort the filtered data, filter will go off and sort will be applied to entire data.
joc_sheet.filter.filterChanging.addHandler((s, e) => {
var editor = s.activeEditor;
editor.buttonClicked.addHandler(editor => {
var btn = wijmo.getActiveElement();
var btnType = btn.getAttribute(‘wj-part’);
if (btnType === “btn-asc” || btnType === “btn-dsc”) {
joc_sheet.sheets[0].itemsSource = new wijmo.collections.ObservableArray(joc_sheet.collectionView.items);
vm.set(“joc_sheet_data”, joc_sheet.sheets[0].itemsSource);
}
})
});
joc_sheet.filter.filterChanged.addHandler(function (s, e) {
if (vm.get(‘is_frozen’) == ‘Y’) {
me.formatFrozenSheet(joc_sheet, jocRange);
}
else
me.formatSheet(joc_sheet);
});
And if I try with below code, Column filter is not working.
joc_sheet.filter.filterChanging.addHandler((s, e) => {
joc_sheet.sheets[0].itemsSource = new wijmo.collections.ObservableArray(joc_sheet.collectionView.items);
vm.set(“joc_sheet_data”, joc_sheet.sheets[0].itemsSource);
});
joc_sheet.filter.filterChanged.addHandler(function (s, e) {
if (vm.get('is_frozen') == 'Y') {
me.formatFrozenSheet(joc_sheet, jocRange);
}
else
me.formatSheet(joc_sheet);
});
And if I not use these filterChanging events, then once if I apply the sort and change the value of any rows data, that value will be updated in another row where it was present in the same row position before the sort.
For example, 1st row is came to 5th row position after the sort. Then if I update the sorted 1st row, then 5th row(it was in 1st row position before the sort) data is also gets updated.
Can I get any solution for these issues.
Thanks and Regards,
Keerthana