Reputation: 798
Now this is going to be a very absurd question. But what can I do, it's the client's requirement. Basically, we have a grid (master-detail type) that goes up to about 15 thousand plus rows (has the potential to go up to 30-50 thousand rows in a few years time).
My client does NOT want any paging, does not want any data cropped as well. Also he isn't exactly using the latest hardware so rendering on browsers is a big issue. He wants to view everything by printing it out or looking through it on the browser. (You may all think how insane that sounds, and it sure is).
Now I want to resolve this issue by rendering html quickly. At the moment its a simple asp.net grid view w/o paging. That essentially renders HTML tables. My options that I think are: - Manually rendering html using div (for quick loading) - export it to pdf or excel (is there any way to export without the need to resort to third party controls?) - give the finger (to the client :D j/k)
So to sum up, whats the best way to show 10,000 plus records of data on html?
Upvotes: 11
Views: 8807
Reputation: 2744
I know this is almost a year late, but in case it helps someone.
Use SlickGrid - It uses divs instead of tables, which gives so much more performance in IE. Check this example
Upvotes: 3
Reputation: 49195
You should do the paging - it does not mean that you need to show only one page of data at a time but rather you should retrieve and render pageful of data at a time (and keep continuously fetching pages one after one till data is finished).
For example, send the first page of data from the server in the initial request. Setup a js timer and use AJAX requests to retrieve subsequent pages of data and load that into the browser. You can have multiple (say 3-4) AJAX requests going on simultaneously for retrieving pages - only thing would be to achieve the ordering correctly in such approach.
I will personally avoid grid-view and render the html table using manual java-script (with help for jquery) or use some java-script template engine. I will use JSON for retrieving the data from the server.
Upvotes: 2
Reputation: 101150
He wants to view everything by printing
This is imho the only viable solution to view all information. PDF or Excel is much better at handling a large number of rows.
Doing the rendering is quite easy. Just set the excel mime type and return a HTML table.
http://www.designdetector.com/archives/05/07/HTMLToExcelTheEasyWay.php
When it comes to PDF, you probably have to use an external library like PDFSharp.
Upvotes: 2
Reputation: 8406
consider using the "Scroller" plug-in for Datatables..
As part of DataTables 1.8 release a new plug-in called "Scroller" was introduced as part of the download package. Scroller is an implementation of virtual scrolling for DataTables, which presents a vertically scrolling table, scrolling the full height of the table, but drawing only the rows which are necessary for the visible display, leading to a huge performance increase. This is quite an exciting plug-in for DataTables not only for the performance increase, but also because it effectively provide a new user interaction with the table, allowing full scrolling of very large data sets.
Upvotes: 7