background preloader

Datatables

Facebook Twitter

PHP basics for DataTables. Jquery datatables - get columns from json. Using Datatables.net JQuery Plug-in with WCF Services. There are several JQuery plug-ins that provide the basic functionality of an html grid: paging, sorting, etc. In essence these plug-ins provide a consolidated display of the data and typically means of which to interact with the data (update, insert, delete, etc). I recently had the opportunity to work with the DataTables.net grid and have been very impressed.

The following post describes the steps I used to make the DataTables grid work in an ASP.NET Webforms environment using a WCF Service as an endpoint. I’ll also go over some of the pitfalls I ran into which required a bit of ‘tweaking’ to get things working smoothly. One cool thing was that for every roadblock, a workaround was quickly discovered. This is huge when investing any time or resources on any third party plug-in or control. First up, if you are not aware of what the DataTables is, it’s a JQuery Plug-in that written by Allan Jardine.

“DataTables is a plug-in for the jQuery Javascript library. A. Jquery - datatables and json formatting error with php. DATA Tables. Example. DataTables server-side processing example There are many ways to get your data into DataTables, and if you are working with seriously large databases, you might want to consider using the server-side options that DataTables provides. Basically all of the paging, filtering, sorting etc that DataTables does can be handed off to a server (or any other data source - Google Gears or Adobe Air for example!) And DataTables is just an events and display module. The example here shows a very simple display of the CSS data (used in all my other examples), but in this instance coming from the server on each draw. Filtering, multi-column sorting etc all work as you would expect. Processing... Showing 1 to 10 of 57 entries Basic initialisation Advanced initialisation Data sources Server-side processing Plug-ins Please refer to the DataTables documentation for full information about its API properties and methods.