binding and filters

Dear Friends,

I bind lists as master and slave, but when I apply filter in slave, the filter dose not strict the binding rule.

pls see=>

How can I filter and set it strict with binding rule?

Thank you
(sorry for my English)



  • edited March 2017


    In essence, the slave collection is filtered according to the binding rule. So, when it is filtered by header filters, the binding filter is ignored.

    You can change the .filterByAll() method of the slave Datatable to preserve your binding rule.

    The filterByAll() method is called automatically, when the Datatable filters itself according to header filters. So, you need to apply the basic logic in it and filter the data again according to the binding rule: this.filter(rule, text, preserve).

    var baseFilter = gridb.filterByAll;
      //repeat your binding rule
        //getCursor returns id of selected record in master
        return obj.index == grida.getCursor();
      }, null, true); //here the 3rd parameter preserves the existing filtering
    gridb.bind(grida, function(slave, master){ 
      return == slave.index;

    Check the following snippet, please:

  • Great!!

  • Good example. But I'd like to go deeper, and preserve filtering in slave table when selection in master table is changed. Is it possible?

  • edited May 2019

    You can filter the slave datatable according to existing filters after bound data is parsed into it:


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!