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.

8
  • You could try adding event handlers for the different actions that would trigger the message to be displayed. Much like the example here: datatables.net/release-datatables/examples/advanced_init/… Commented Jul 3, 2012 at 17:29
  • @Robodude: I want to display default progress message given by datatables. Showing progress message in alert will not a good idea. I checked available functions and couldnt find out function which displays progress message. Please check example I have mentioned in question, I am looking for the same. Commented Jul 3, 2012 at 17:49
  • So I firebugged the example and there is a hidden div on the page that contains the "Processing..." text and the way I imagine display of it is controlled is right before the ajax for the server processing is sent, it shows it and when it's completed, it hides it. I would check to see if you have a default hidden div on your table when enabling bProcessing and control its visibility when the conditions for it appearing are met. Commented Jul 3, 2012 at 17:57
  • 4
    The id of the hidden div should be the ID.OF.YOUR.TABLE_processing Commented Jul 3, 2012 at 17:59
  • @Robodude: Thanks man. Can you please post this as a answer. [If you want some points :) ] Commented Jul 3, 2012 at 18:01

1 Answer 1

21

So I firebugged the example and there is a hidden div on the page that contains the "Processing..." text and the way I imagine display of it is controlled is right before the ajax for the server processing is sent, it shows it and when it's completed, it hides it. I would check to see if you have a default hidden div on your table when enabling bProcessing and control its visibility when the conditions for it appearing are met.

The id of the hidden div should be the ID.OF.YOUR.TABLE_processing

So now I'd create handlers for the different conditions that you need to account for much like the examples seen here:

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.