Update datatable after server response

Hi All,
I am unable to force update of a datatable (with their server filters) after an ajax response.

Please see:

Any help would be appreciated!


  • As a licensed user, I'm a bit surprised that no one webix guru take in carge this question.
    So, I try again, but sure, for the last time:

    As stated in the docs:


    refilters DataTable by all specified filters

    but doing some debug on the source code, it seems that it not "refilter", but simply filter if the filter is different than the previous one:

    url += params.join("&");
    if (this._feed_last.url !== url){
    this._feed_last.url = url;
    this.load(url, final_callback);
    } else {
    this._load_count = false;

    what is the best way to force a reload of a datatable preserving they current parameters (i.e.. start=300&count=150&filter[field1]=77&filter[field2]=15)?


  • I use filterByAll widely and have never had a problem. maybe since I don't use get method.
    in your case try to register a fake filter (on filterless visible column) which always returns different value (e.g. Date.now() or webix.uid())

    table.registerFilter({}, {columnId:"some_col"},{
        $server: true,
        getValue:function(){return webix.uid();},
  • Thanks @integral
    fake filters woks fine, I think the problem may be in the GET
    by the way, even if the request is not issued to the server, both events woks as expected:


  • You can have a fake filter for some column, which will ensure that the filter state changes.

    Normally the Datatable will not make a request for the same data unless it is explicitly stated. For instance, you can compose the loading URL from the widget state:

    var filter = $$("tbl").getState().filter;  //filters state
    var count = $$("tbl").config.datafetch;    //number of records to fetch 
    var start = $$("tbl").count;               //current data count

    And, using the above data, issue an Ajax request manually:

        webix.ajax.$callback($$("tbl"), callback, "", data.json(), -1);
  • Thanks @Nastja
    now the process is perfectly crear.
    It works as expected.


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!