jQWidgets Forums

jQuery UI Widgets Forums DataTable datatable databind

This topic contains 2 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 12 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • datatable databind #55157

    lineker
    Participant

    Hi,

    I have a dropdownlist(city filter) and a datatable.
    When I select a value from dropdownlist, I want datatable to make request to server to get new data according to selected dropdownlist value
    I use below code:

    $(‘#city’).on(‘checkChange’, function (event) {
    dataSourceFilterTown.dataBind(); // refresh town filter according to selected city value
    sourceDataTable.dataBind(); // refresh datatable
    });

    I got follwing error

    sourceDataTable.dataBind is not a function

    What is the way of it?

    datatable databind #55158

    lineker
    Participant

    Hi,

    I solved it by using updateBoundData.
    When I select value from city filter, it makes Ajax request to server for datatable data and gets new data
    But at paging, it still writes old number

    For example

    All data count is 83
    I select a city from city filter, and new data is 26.
    I see 26 at datatable but it still writes 83 at paging

    datatable databind #55161

    Peter Stoev
    Keymaster

    Hi lineker,

    To learn how to implement Server Filtering, check out: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdatatable/javascript-datatable-server-filtering.htm?arctic

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.