T
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.
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.