Posted 27 September 2017, 12:56 am EST
Hi,
In the Spread version 10, refilter() function is completely removed. Can you please help with an alternate to this?
Thanks
Forums Home / Spread / SpreadJS
Posted by: sripalavi on 27 September 2017, 12:56 am EST
Posted 27 September 2017, 12:56 am EST
Hi,
In the Spread version 10, refilter() function is completely removed. Can you please help with an alternate to this?
Thanks
Posted 28 September 2017, 10:13 am EST
Hi Sripalavi,
You can now simply call the filter() method after macking changes to filter with latest version.
For example with previous version you needed the code:
$(“#button2”).click(function(){
// Remove filtering for Column1
var rowFilter = $(“#spreadContainer”).data(“spread”).getActiveSheet().rowFilter();
if(rowFilter){
rowFilter.removeFilterItems(0);
rowFilter.reFilter();
}
Whereas with the v10(latest) you can use the code as follows:
$(“#button2”).click(function(){
// Remove filtering for Column1
var rowFilter = $(“#ss”).data(“workbook”).getActiveSheet().rowFilter();
if(rowFilter){
rowFilter.removeFilterItems(0);
rowFilter.filter();
}
I hope it clears the doubt.
Thanks,
Deepak Sharma
Posted 10 October 2017, 11:32 pm EST
Hello,
Could you please clarify in which case you need to refilter? However, when updating the data or adding any condition SpreadJS will auto refilter.
Thanks,
Reeva