12

EDIT :
I want to use the default processing message feature provided by datatables but looks like it works only with server side processing. I am not using server side processing.


Original Question :
I want to display processing message in DataTables whenever I am adding / deleting records from DataTables. I am not using server side processing, depending on few events I delete / add records to DataTables.

I tried using bProcessing as true and sProcessing to give custom progress message but looks like it works only with server side processing. How can I achieve same with without server side processing? How can I explicitly call a function which displays processing message?

Here is a similar example but it uses server side processing.

Thanks.


Solution :
DEMO Thanks @Robodude.

4

1 回答 1

21

所以我启动了这个例子,页面上有一个隐藏的 div,其中包含“正在处理...”文本,我想象它的显示方式是在发送服务器处理的 ajax 之前,它显示它和完成后,它会隐藏它。我会在启用 bProcessing 时检查您的表上是否有默认的隐藏 div,并在满足其出现条件时控制其可见性。

隐藏 div 的 id 应该是 ID.OF.YOUR.TABLE_processing

因此,现在我将为您需要考虑的不同条件创建处理程序,就像这里看到的示例一样:

http://datatables.net/release-datatables/examples/advanced_init/events_live.html

于 2012-07-03T18:05:30.150 回答