Problem refreshing table data

Problem refreshing table data

Gnorro76Gnorro76 Posts: 2Questions: 2Answers: 0

Hi

I read a lot of thread but I can't solve my problem.

I have a datatable that calls a REST webservice that returns a json array of results. This works when the page is loaded. Then I have a button that call the REST service again with some parameters in order to filter result. The rest service return the result filtered, but the table doesn't refresh. If I reload the page data is ok.

I suppose I have a configuration missing...

This is my datatable configuration:
var grid = new Datatable();

    grid.init({
        src: $("#datatable_ajax"),
        onSuccess: function (grid) {
            // execute some code after table records loaded
        },
        onError: function (grid) {
            // execute some code on network or other general error  
        },
        dataTable: { // here you can define a typical datatable settings from http://datatables.net/usage/options 
            "lengthMenu": [
                [20, 50, 100, 150, -1],
                [20, 50, 100, 150, "All"] // change per page values here
            ],
            "pageLength": 20, // default record count per page
            "ajax": {
                "url": urlList.allocationSearch // URL to REST service
            },
            "order": [
                [1, "asc"]
            ] // set first column as a default sort by asc
        }
    });

Thanks

This discussion has been closed.