Solved

Display a particular row in datatables 1.9.2 with server side processing

Posted on 2013-01-11
1
830 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
This article discusses how to create an extensible mechanism for linked drop downs.
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

773 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