Yes you can do that. Is this what you mean?... pass a data to a server?
Yes you can do that. Is this what you mean?... pass a data to a server? $(document).
Ready(function() { $('#example'). DataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "../examples_support/server_processing. Php", "fnServerData": function ( sSource, aoData, fnCallback ) { /* Add some extra data to the sender */ aoData.
Push( { "name": "more_data", "value": "my_value" } ); // this line will give additional data to the server... $. GetJSON( sSource, aoData, function (json) { /* Do whatever additional processing you want on the callback, then tell DataTables */ fnCallback(json) } ); } } ); } ).
Thanks, but no - I am not using PHP. This is a asp. Net application.
I also use asp. Net web services to get the data. So what I would like to do it access asp.Net web service directly in Initialization routine of DataTables.
Not server page (such as . Php, or . Aspx) but a web service.
I haven't actually tried it yet and I am just wondering whether this is a accepted practice or not; or whether it's even possible... – sarsnake Jan 25 '10 at 17:57 I guess you two don't understand each other :) @gnomixa didn't want to pass any additional data to the server. @Reigel didn't insist on PHP, that was just for example. – Anton Jan 25 '10 at 18:02 I guess it's possible... Well, I'm not a master of asp.
Net but I think you only need to pass json to datatables. Net and you will have no problem on it. I think.
– Reigel Jan 25 '10 at 18:04 @Anton: lol... hehe maybe... – Reigel Jan 25 '10 at 18:05 thankd Reigel and Anton. I guess I should just try it and see whether it works:) – sarsnake Jan 25 '10 at 18:06.
I'm working on this right now. I'm using ASP. Net MVC 2 Web Application, using the dataTables religiously, and need to show over 1000 records on each table.
Server-Side processing was the way to go for me. Here's what we have. Here's our declaration in the view (/Admin/Unassigned).
Here's our controller function (/Admin/UnassignedTable). Public void UnassignedTable() { statusID = (int)PTA.Helpers.Constants. Queue; locationID = (int)PTA.Helpers.Constants.
Reviewer; _AdminList = PTA.Models.IPBRepository. GetIPBsByStatus(Convert. ToInt32(statusID), Convert.
ToInt32(locationID)); //_AdminList is an IEnumerable, IPB being our class IEnumerable _NewList; int nDisplayStart = Convert. ToInt32(HttpContext.Request.QueryString. Get("iDisplayStart"); int nDisplayLength = Convert.
ToInt32(HttpContext.Request.QueryString. Get("iDisplayLength"); _NewList = _AdminList. Skip(nDisplayStart).
Take(nDisplayLength).ToList(); string strOutput = "{"; strOutput += "\"sEcho\":" + HttpContext.Request.QueryString. Get("sEcho") + ", "; strOutput += "\"iTotalRecords\":" + _AdminList.Count().ToString() + ", "; strOutput += "\"iTotalDisplayRecords\":" + _AdminList.Count().ToString() + ", "; strOutput += "\"aaData\":"; foreach (IPB ipb in _NewList) { strOutput += " "; strOutput += "\"" + ipb. IPBName + "\","; strOutput += "\"" + ipb.
PubDate + "\","; strOutput += "\"" + ipb. Change + "\","; strOutput += "\"" + ipb. ChangeDate + "\","; strOutput += "\"" + ipb.
TotalParts + "\","; strOutput += "\"" + ipb. TotalPartsReports + "\","; strOutput += "\"" + ipb. ALC + "\","; strOutput += "\"" + ipb.
DateAdded + "\","; strOutput += "\"" + "" + "\","; //Need to add drop down control, that's why it's blank. StrOutput += "\"" + "" + "\","; //Need to add drop down control, that's why it's blank. StrOutput += "\"" + "" + "\","; //Need to add drop down control, that's why it's blank.
StrOutput += "\"" + "" + "\""; //Need to add drop down control, that's why it's blank. StrOutput += ""; if (ipb! = _NewList.Last()) { strOutput += ", "; } } strOutput += "}"; Response.
Write(strOutput); } NOTE! When adding a control, you must put your quotes for your control values as \\" because the backslash needs to be in the JSON data. Hopefully, in the controller you can access your webservice.
I'm not too familiar with web programming, so I don't know what you'd need to do. I just thought this would help.
Here you can find one article about using DataTables with ASP. NET MVC Integrating jQuery DataTables with ASP. NET MVC.
Hope this could help you. There are few thing that can help you (model class for accessing DataTables parameters and class for direct serialization int the JSON). It makes code little bit cleaner.Regards.
It is possible provided your web service satisfies DataTables API conventions. Take a look at datatables.net/usage/server-side UPDATE I've used DataTables AjaxSource in my ASP. NET MVC application the way you want - specifying it in the initialization routine.
However, my server side was specially designed so that DataTables could speak to it.
– Reigel Jan 25 '10 at 18:12 check this out. Dotnetspider.Com/DotNet-Tutorials. Aspx .
Net is quite different from traditional php. – sarsnake Jan 25 '10 at 18:36.
I ended up composing the table by myself. It suffices for my purposes that are fairly minimal now.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.