Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Display a particular row in datatables 1.9.2 with server side processing

Posted on 2013-01-11
1
835 Views
Last Modified: 2013-01-15
Use datatables 1.9.2 with server side processing:
oTable = $('myTable').dataTable({
					"bProcessing": true,
					"bServerSide": true,
					"bStateSave": false,
					"bAutoWidth:":false,
					"sAjaxSource":”myServerCodeFile.xxx"
				});

Open in new window

                       
Also I have a window that for editing and adding new records that submits the data through ajax and just updates the table rather than refreshing the page.  Before I was not using server side processing but had to switch due to the large volume of records.  Previously I updated records with the following code, the top for new records and the bottom for updateds
//add new record and display that record
oTable.fnAddDataAndDisplay(aData,true);
	
//update a record and keep it displayed 
oTable.fnUpdate(row,rowIndex.value,undefined,true,true);
oTable.fnDisplayRow(aNodes);
		
 

Open in new window


However, now that I’m using serverside the display portion of the above functions do not work (which is expected I believe).  Is there an alternative API call to accomplish this for serverside tables or any examples of how to accomplish.  The page can refresh but I would like to get the user back to the record with the same filtering they had on the table.
Thanks!
0
Comment
Question by:HyperBPP
1 Comment
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 38773736
before calling the ajax service, save the row number in your client and update selected row when call is back.
as to the filtering, why can;t you apply the same filtering on server side?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question