init

this event is triggered when the table is initially rendered

myTable.on("init", function () {
    console.log("init");
});                       
                    

update

this event is triggered when the table content is updated

myTable.on("update", function () {
    console.log("update");
});                                    
                    

getData

Argument: all table data rows

this event is triggered when the table data are processed

myTable.on("getData", function (dataRows) {
    console.log(dataRows);
});                       
                        

fetchData

Argument: the JSON object from the server

this event is triggered when data are fetched from the server

myTable.on("fetchData", function (serverData) {
    console.log(serverData);
});                        
                        

search

Argument: search string

this event is triggered after the table is filtered from a search

myTable.on("search", function (query) {
    console.log(query);
});                        
                        

sort

Arguments: sort column, sort direction

this event is triggered after the table is sorted

myTable.on("sort", function (column, direction) {
    console.log(column);
    console.log(direction);
});                       
                        

paginate

Arguments: old page number, new page number

this event is triggered when a page is selected in the pager

myTable.on("paginate", function (old_page, new_page) {
    console.log(old_page);
    console.log(new_page);
});                       
                        

perPageChange

Arguments: old value, new value

this event is triggered when the elements per page are changed

myTable.on("perPageChange", function (old_value, new_value) {
    console.log(old_value);
    console.log(new_value);
});