pattern for displaying tabular data

Discussion in 'ASP .Net' started by t, Jan 28, 2006.

  1. t

    t Guest

    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.
     
    t, Jan 28, 2006
    #1
    1. Advertising

  2. t

    Spam Catcher Guest

    "t" <> wrote in news:drgg73$oho$:

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


    Anything wrong with using a DataGrid or Data List?

    --
    Stan Kee ()

    Boycott StarForce!
    http://www.glop.org/starforce
     
    Spam Catcher, Jan 28, 2006
    #2
    1. Advertising

  3. t

    Jeff Guest

    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" <> wrote in message news:drgg73$oho$...
    > 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.
     
    Jeff, Jan 28, 2006
    #3
  4. t

    Pier Paolo Guest

    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.
     
    Pier Paolo, Feb 16, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luigi Donatello Asero

    Layout versus tabular data.

    Luigi Donatello Asero, Oct 14, 2005, in forum: HTML
    Replies:
    8
    Views:
    496
    Luigi Donatello Asero
    Oct 14, 2005
  2. richard
    Replies:
    19
    Views:
    613
    Hywel Jenkins
    Sep 28, 2006
  3. Replies:
    3
    Views:
    896
    James Kanze
    Jun 20, 2007
  4. Malak
    Replies:
    5
    Views:
    512
    Joe Kesselman
    Aug 13, 2007
  5. hyena
    Replies:
    3
    Views:
    1,193
    hyena
    Aug 29, 2007
Loading...

Share This Page