Results 1 to 8 of 8

Thread: Getting a resultset to display in multiple columns

  1. #1
    Join Date
    Dec 2004
    Posts
    2,021
    Rep Power
    0

    Default Getting a resultset to display in multiple columns

    I'm querying a database for a single field "email" and I need to display it in 2 or 3 columns. I guess a datalist would've worked except I have too much data to display at once so I need to make it go over several pages and the datalist doesn't support that so I tried using a gridview but that doesn't seem to be customizable so that the data can be viewed in several columns, the best I seem to be able to get is for the same data to be populated in each column so in other words the data is repeated. Is there a control or some method to get what I want?
    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use. 2006 Cloud Solutions. All rights reserved.

  2. #2
    Join Date
    Dec 2004
    Posts
    1,181
    Rep Power
    0

    Default

    Use a repeater control. It's very flexible and you can modify it however you want. You can generate a 3-columned table with it with the information.
    'If we're supposed to work in Hex, why have we only got A fingers?'

    Follow Me: @psybuck2002us

  3. #3
    Join Date
    Dec 2004
    Posts
    2,021
    Rep Power
    0

    Default

    Ok, thanks, gonna read up on that.
    Last edited by Cloud; May 29, 2009 at 10:35 AM.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use. 2006 Cloud Solutions. All rights reserved.

  4. #4
    Join Date
    Jun 2004
    Posts
    1,057
    Rep Power
    0

    Default

    Cloud, just use a Listview control . it comes in asp.net 3.5. It also has support for pager control (drag & drop, aslo 3.5).

    I know your problem exactly and this control solves it
    8800GT - AMD X2 - 4GB Ram - 600GB Disk - M Audio Revolution 7.1 - Sky is the Limit

  5. #5
    Join Date
    Dec 2004
    Posts
    2,021
    Rep Power
    0

    Default

    Quote Originally Posted by psybuck2002us View Post
    Use a repeater control. It's very flexible and you can modify it however you want. You can generate a 3-columned table with it with the information.
    It doesn't seem that you can get the data split across multiple pages and i'll be generating too much information to display all at once.

    Quote Originally Posted by digimon View Post
    Cloud, just use a Listview control . it comes in asp.net 3.5. It also has support for pager control (drag & drop, aslo 3.5).

    I know your problem exactly and this control solves it
    Thanks for the suggestion but I need a solution for asp.net 2.0. I've been searching for a solution online but so many different possible search terms it's so hard to find it.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use. 2006 Cloud Solutions. All rights reserved.

  6. #6
    Join Date
    Jun 2004
    Posts
    1,057
    Rep Power
    0

    Default

    alright, google" collectionpager codeproject "

    that is what i used to use to page a datalist control
    8800GT - AMD X2 - 4GB Ram - 600GB Disk - M Audio Revolution 7.1 - Sky is the Limit

  7. #7
    Join Date
    Dec 2004
    Posts
    1,181
    Rep Power
    0

    Default

    Quote Originally Posted by Cloud View Post
    It doesn't seem that you can get the data split across multiple pages and i'll be generating too much information to display all at once.
    You can add paging support to the repeater control. Check here:

    http://www.4guysfromrolla.com/articles/081804-1.aspx

    EDIT: Just a tip. If you will be displaying large volumes of data, you may want to cache your data collection object (ex. datatable) so that you only need to read from the database once and reduce database requests. It will also speed up your application considerably, especcially where paging is concerned.
    Last edited by psybuck2002us; Jun 3, 2009 at 09:42 AM.
    'If we're supposed to work in Hex, why have we only got A fingers?'

    Follow Me: @psybuck2002us

  8. #8
    Join Date
    Dec 2004
    Posts
    2,021
    Rep Power
    0

    Default

    Thanks for the suggestions but I used a different solution b4 I saw the responses, been meaning to post it but never got the time. We used sql to solve it, made temp tables to get like every other record and used each one as a result. I'll still be checking out your suggestions if and when I get a chance tho.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use. 2006 Cloud Solutions. All rights reserved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •