I am using JQuery Datatables. When the table renders , it shows as "No Data Available in the table", and after sometime the table starts appearing with data and this "No data Available" goes.
I dont want this "No data available to e", instead if Something like "Loading " or "Please wait" appears that will be great or nothing es that will solve my problem.
I am using JQuery Datatables. When the table renders , it shows as "No Data Available in the table", and after sometime the table starts appearing with data and this "No data Available" goes.
I dont want this "No data available to e", instead if Something like "Loading " or "Please wait" appears that will be great or nothing es that will solve my problem.
Share Improve this question asked May 30, 2016 at 9:39 Atul kumar singhAtul kumar singh 4741 gold badge10 silver badges26 bronze badges 3- You may use these example from datatables/reference/option/processing & datatables/reference/option/language.processing – Jacky Shek Commented May 30, 2016 at 9:51
-
I think you can use
oLanguage
->eEmptyTable:""
properties, as you can see the further discussion at this stackoverflow discussion – hmd Commented May 30, 2016 at 9:53 - Refer this for showing empty data message in Datatables – Reshma Reghunatha Panicker Commented May 30, 2016 at 10:02
2 Answers
Reset to default 4Look here for plete reference -> https://datatables/reference/option/language the attributes you are looking for is loadingRecords
, emptyTable
and zeroRecords
.
$("#example").DataTable({
language: {
emptyTable: "No data available in table", //
loadingRecords: "Please wait .. ", // default Loading...
zeroRecords: "No matching records found"
}
})
Angular dataTables :
$scope.dtOptions = DTOptionsBuilder.newOptions()
.withLanguage({
emptyTable: "No data available in table",
loadingRecords: "Loading...",
zeroRecords: "A different no matching records message"
})
Because you tagged your question with angularjs, I suppose you are using the datatable module for angularjs.
So try to add to your table tag:
class="ng-cloak"
It prevents to display html before the table is ready (module is initializated):
AngularJS: ngCloak Official API doc
If you not, it could happen because you are using ajax() to get the data to inject in your table, so try to initialize your datatable plugin after your ajax call like in this example
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744216302a4563571.html
评论列表(0条)