Click here to Skip to main content
11,717,883 members (80,499 online)
Rate this: bad
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 7:14am
Edited 3-Jan-13 7: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 at 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
0 Sergey Alexandrovich Kryukov 809
1 OriginalGriff 215
2 F-ES Sitecore 210
3 Maciej Los 140
4 Jochen Arndt 120
0 Sergey Alexandrovich Kryukov 1,494
1 OriginalGriff 535
2 Maciej Los 529
3 Richard MacCutchan 440
4 CHill60 415

Advertise | Privacy | Mobile
Web04 | 2.8.150901.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2015
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