I have below code in jsp to create a dataTable. I am using bProcessing as true which displays the 'processing' indicator till i get the data from the server. I want to show the message as "loading data.." instead of 'processing'. I tried using sProcessing as suggested on various sites but it does not work?
customersTable = $('cutomer').dataTable({
"sAjaxSource": "ajax url",
"bProcessing":true,
"bDeferRender": true,
"sServerMethod": "POST",
"oLanguage": {
"sProcessing": "loading data..."
}
});
"oLanguage": {
"sProcessing": "loading data..."
}
works for me and also suggested in dataTable Api's http://datatables.net/ref. Just check whether you are putting at right place. Otherwise you can also try fnPreDrawCallback and fnDrawCallback
You could try sLoadingRecords instead of sProcessing, as sLoadingRecords deals with loading data, and sProcessing deals with datatables sorting/searching local data. Since you are using server side processing, I'm don't think sLoadingRecords will work for you, but it might actually change the text for you.. Let us know it it works for you.
Here's the info on sLoadingRecords from the DataTables website.
When using Ajax sourced data and during the first draw when DataTables is gathering the data, this message is shown in an empty row in the table to indicate to the end user the the data is being loaded. Note that this parameter is not used when loading data by server-side processing, just Ajax sourced data with client-side processing.
And for sProcessing
Text which is displayed when the table is processing a user action (usually a sort command or similar).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With