Displaying data in a grid
In Web 2.0 sites, the term "data grid" usually means a spreadsheet-/MS Excel-like display using HTML tables. Data grids provide usability and easy access to data for users. Some common features of data grids are:
Ability to paginate data
Ability to sort columns
Ability to sort rows
Ability to quickly search or filter data fields
Ability to have frozen/fixed rows or headers
Ability to have frozen columns or headers
Ability to highlight any column of interest
Ability to load from different data sources, such as JSON, JavaScript array, DOM, and Hijax
Ability to export data to different formats
Ability to print formatted data
Getting ready
We'll require the DataTables jQuery plugin from http://datatables.net/, along with jQuery core. Based on our requirement, we may sometimes require additional plugins.
How to do it...
In a simple implementation (without using any other data sources), it is enough to display the data in an HTML table. DataTables, without any plugins and additional...