[Datatables-1.9.4] Is it possible to make datatable synchronic when loading data?

[Datatables-1.9.4] Is it possible to make datatable synchronic when loading data?

Huk256Huk256 Posts: 8Questions: 2Answers: 0

Hello.

On my page I use two datatables, one for "Entries you can select", and other to display already selected entries, so when somebody selects something, it will disappear from one table and will show in the other.

Since Datatables use asynchronous requests to retrieve data, if users click fast enough multiple request will be send before table ends refreshing. So question is - is there any way to make refreshing synchronic, so that user would be unable to press any buttons while table is refreshing data?

Thanks in advance.

Answers

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    A couple of options off the top of my head:

    1. Enable the processing display ( bProcessing in 1.9-) and style it to cover the entire page (position:fixed)
    2. Use an synchronous Ajax (Sjax) call (in 1.9- you need to use fnServerData to do that)

    Allan

  • Huk256Huk256 Posts: 8Questions: 2Answers: 0

    Sorry for my late response, and thanks for the reply, I will test what You posted in the near future, I think it should work.

This discussion has been closed.