jQuery UI Widgets Forums Grid long Filter data issue

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  pcasals 5 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • long Filter data issue #105167

    pcasals
    Participant

    Hello,
    I am testing jqxGrid and I have an issue I have to solve before purchasing. I am developing with VS2017/C#/jQuery & boostrap. I have a grid with many columns, and users must be able to search for more than one column. Everything works ok if I filter for 1 or 2 columns. If I add a 3rd filter, ULR grows over 3000 characters, so the browser is rejecting the request. Is it possible to post filter data, instead of sending them by GET?
    Thanks in advance,
    Pedro

    long Filter data issue #105169

    Peter Stoev
    Keymaster

    In this case you should use Post request. Get works until 2500 chars

    long Filter data issue #105170

    pcasals
    Participant

    Hi Peter,
    I Know that I should post it. But in what event do I have to implement the ajax call? Do you have an example?
    Thanks
    Pedro

    long Filter data issue #105280

    pcasals
    Participant

    Hi!
    I do not know how to do it. Any clue, or example?

    Thanks,
    Pedro

    long Filter data issue #105315

    pcasals
    Participant

    I have found the solution. I have overwritten the loadServerData function of the dataadapter, using ajax post. This is my method, if it helps someone:
    var dataAdapter = new $.jqx.dataAdapter(source, {
    loadServerData: function (serverdata, source, callback) {
    $.ajax({
    type: “POST”,
    dataType: source.datatype,
    url: source.url,
    data: serverdata,
    success: function (data, status, xhr) {
    callback({ records: data.records, totalrecords: data.totalrecords });
    },
    error: function (XMLHttpRequest, textStatus, errorThrown) {
    alert(“some error”);
    }
    });
    }
    });

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.