0

I am using datatables with server-side processing turned on.

There are instances where persistence in database is done asynchronously, but I do get the event on server when something will be added and need to show that on the client. In that case, I want to add a row on client and increment the count.

The way I implemented is by following these steps:

  1. set bserverside to false
  2. call fnAddData()
  3. set bserverside to true

This way row gets added on the client but since client only had current page - the total number of records become (page size + 1) instead of (previous total count + 1). I tried changing settings._iRecordsTotal but it doesnt help.

Can you please help or provide me with any other approach?

0

1 Answer 1

1

There is a third party plugin for adding new records into the JQuery DataTable http://jquery-datatables-editable.googlecode.com/svn/trunk/index.html.

You can see example in the http://jquery-datatables-editable.googlecode.com/svn/trunk/addingrecords.html and documentation on the http://code.google.com/p/jquery-datatables-editable/wiki/AddingNewRecords

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.