Solved

Display a particular row in datatables 1.9.2 with server side processing

Posted on 2013-01-11
1
816 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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
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)

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now