Click here to Skip to main content
12,758,051 members (33,090 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET HTML Webmatrix
How to organize contents of a table to be displayed in multiple pages? Consider you have a table with 100 rows and you want to view 10 rows at a time (Like the way that several Email messages are organized in pages). Do we have a special data structure for this? And how can I add filters to manage it better?
Posted 3-Jan-13 8:14am
Updated 3-Jan-13 8:21am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The most used way to display data in tabular format from a database in WebMatrix is the WebGrid helper.
It offers a wide variety of options for sorting and paging the rows displayed and supports asynchronously updating the grid content using AJAX.
For a complete class reference look at WebGrid Class[^].
Maybe, the best place for in-depth WebGrid tutorials is the Mike Brind's site[^].
Start with Looking At The WebMatrix WebGrid[^] and then search for more advanced articles.
cs101000 5-Jan-13 10:37am
Thanks! It was really helpful.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It looks like what you really need is proper layout CSS styles and, no wonder… proper paging.

There is a number of CodeProject article on this topic which can help you. Please see:
Paging of Large Resultsets in ASP.NET[^],
ASP.NET Pagination[^].

Actually, there a a lot more to look at:[^].

Assuming you don't have too many columns, CSS styles can ensure you use all available page width and effectively arrange columns, while paging will be responsible for vertical dimension and control navigation by ranges of rows.

Good luck,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100