Datagrid Column Paging

Discussion in 'ASP.NET 2.0' started by cilynx, Jul 18, 2005.

  1. I'm looking for something along the lines of paging in a datagrid, but it needs to work both horizontally and vertically. I have a dataset that has over 100 rows and 100 columns. I'm looking for an easy way to page across the whole set maybe 10x10 at a time. I know that DataGrid supports row paging out of the box, but I've yet to come across anything that adds that sort of functionality to the columns. I suppose I could throw together some code to catch the postback of what columns are displayed and switch up to a new set, but this just seems like it should be built in. Any ideas?

    Thanks in advance...

    (Things like this remind me why I prefer Linux/Perl...but I digress...)
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    i think you can sort the column. in asp.net 1.1, you have to write code to do that but i think 2.0 has it built in.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Yes, sorting is a built in function in ASP.NET 2.0; however, I don't think it can do what I need.

    As far as I can tell, you can sort by any column you want, which rearranges the rows as expected. You can also easily page through with however many rows on a page you like. This is also built in and is quite nice. What I need is something that will let me do the same thing with columns. I want the first 10 columns on the first page and a little arrow navigation setup just like it has for the rows to get to the next set of columns.

    As of the moment, I've given up on finding an easy, built-in method of doing this and I'm writitng it myself. If anyone has any good ideas, I'm open.

    -r
     

Share This Page