473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

pattern for displaying tabular data

t
Hi,

I have the following problem. The web-based software I am to create is going
to display tabular data. Lots of data so I need some pagging mechanism. I
thought about creating three classes: GridView (displayng tabular data),
PaggingControl (displaying [Previous] and [Next] buttons) and DataSource (for
retrieving data from the db. In the database I have following data:

id | column1 | column2
-------------------------------------
1 | data11 | data 12
2 | data21 | data 22
(...)

DataSource class retrieves data basing on three parameters: id, pagesize,
direction. For example DataSource(30, 10, Back) gets records with id 20, 21,
..., 29.

The question is: are there design patterns describing such a problem. Any
solutions you'd recommend?

T.
Jan 28 '06 #1
2 1329
This link will help with your DataClass (accomplishing what you describe is
easier said than done... this article gives you options)
http://www.aspfaq.com/show.asp?id=2120
If you are using SQL Server 2005, you have additional options; check with
the SQL Server NG for those.

Otherwise I'm not sure about a specific or well-known pattern of which you
ask.

-HTH

"t" <t@tt.pl> wrote in message news:dr**********@nemesis.news.tpi.pl...
Hi,

I have the following problem. The web-based software I am to create is
going
to display tabular data. Lots of data so I need some pagging mechanism. I
thought about creating three classes: GridView (displayng tabular data),
PaggingControl (displaying [Previous] and [Next] buttons) and DataSource
(for
retrieving data from the db. In the database I have following data:

id | column1 | column2
-------------------------------------
1 | data11 | data 12
2 | data21 | data 22
(...)

DataSource class retrieves data basing on three parameters: id, pagesize,
direction. For example DataSource(30, 10, Back) gets records with id 20,
21,
.., 29.

The question is: are there design patterns describing such a problem. Any
solutions you'd recommend?

T.

Jan 28 '06 #2
t wrote:
Hi,

I have the following problem. The web-based software I am to create is going
to display tabular data. Lots of data so I need some pagging mechanism. I
thought about creating three classes: GridView (displayng tabular data),
PaggingControl (displaying [Previous] and [Next] buttons) and DataSource (for
retrieving data from the db. In the database I have following data:

id | column1 | column2
-------------------------------------
1 | data11 | data 12
2 | data21 | data 22
(...)

DataSource class retrieves data basing on three parameters: id, pagesize,
direction. For example DataSource(30, 10, Back) gets records with id 20, 21,
.., 29.

The question is: are there design patterns describing such a problem. Any
solutions you'd recommend? In my opinion it depends on how much rows you have to extract. You can
not think to make every time a query (if tables are big) to get the next
recordset, it is more efficient for DB (I am a dba but i like to
develop) if you get all the recordset and then paged it. You can do it
mantainging it in session or directly in javascripts ....I'd look at
technologies like AJAX so you put the work on the browser ....(if you
dont have dialup visitors :)
T.

Feb 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: bobdedogh | last post by:
can anyone add live hyperlinks to the sortable table made by the code supplied by Machi, or know of a simple alternative bob Machi wrote Mar 10 1999, 8:00 am >>>>>>>>>>>>>> .... Hello...
3
by: Robin S. | last post by:
I tried to ask this question several days ago, but I didn't explain my application correctly. Basically I want to have one record from table "A" and I want to display, say, 5 records from table...
7
by: farseer | last post by:
Here is the scenario: I have an interface which defines get methods for data that will make up a row in a table. However, the source of this data may, over time, switch/change (The company may...
2
by: swoozie | last post by:
Hello, I'm trying to display two sets of tabluar data in two tables. There is a submit button on the page to launch everything, and a refresh button to update the tables without having a...
2
by: Joo Park | last post by:
Hello, i have an aspx page that displays data in tabular format. I'd like to change this page so that it outputs that same data into excel format. what needs to change in an aspx page to do...
2
by: t | last post by:
Hi, I have the following problem. The web-based software I am to create is going to display tabular data. Lots of data so I need some pagging mechanism. I thought about creating three classes:...
2
by: teju | last post by:
Hello, I have to display all the data from the database in tables in ASP. I am able to get the data but the problem is of displaying one to many relations.Like below Title1 has two records but how...
38
by: Sanders Kaufman | last post by:
I'm converting my table-based layouts to css-positioned divs - but the ONLY reason I'm doing it is because it's *considered* a best practice. I don't really see where anything goes hinky when...
3
scubak1w1
by: scubak1w1 | last post by:
Hello, I am wanting a "pretty output" of tabular data generated on the fly and saved in an array (PHP)... That is, I have a link so users can chart (JpGraph) and download (CSV) tabular data,...
0
by: Carona | last post by:
Hi, This seems like a simple question, even for someone as green as me, but i'm not sure of how to proceed. I'm working with WM5 and have a simple application with some data that i want to display...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.