How can i refilter datatable

edited August 2015 in Technical questions

I use serverFilter in my datatable. I have following code

{
id: "customFilter",
     view:"richselect",
     label: 'Пользовательские фильтры',
     labelWidth: 200,
    .....
}
voterTable.registerFilter($$("customFilter"),
            { columnId:"customFilter" },
            {
                getValue:function(node) {
                    return node.getValue();
                },
                setValue:function(node, value) {
                    node.setValue(value);
                }
            }
        );
customFilter.attachEvent("onChange", function(newv, oldv){
            voterTable.filterByAll();
            voterTable.filter();
            voterTable.find();
            voterTable.refresh();
        });

But nothing dont work properly. Can somebody help me?

Comments

  • The code works for me. Please, check the snippet: http://webix.com/snippet/4e456aea

  • Helga, your given sample works, but if you try to do this with server filter it will not work

  • Could you please share the snippet that doesn't not work?

    In the code above you show the fully client-side filter. Our serverFilter doesn't actually filter the existing component data but sends a request to server and reloads the data according to the filter value.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!