Results 1 to 11 of 11

Thread: Paging data

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2003
    Location
    Phoenix, AZ
    Posts
    22

    Question Paging data

    I'm trying to make a page that will take SQL records and present them as it's done in a search results page (essentially paging data): with links to the previous and next 20 records, plus a count of how many records there are on the current page and also the ability to delete a record off the page. It's a lot of stuff I've never done before and I'm not sure where to begin. Can anyone start me off in the right direction (w/o referencing datagrids)?
    "Ignorance and prejudice and fear walk hand in hand" - 'Witch Hunt', by Rush

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    whats wrong with datagrid? all that is built in. why re-invent the wheel?
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2003
    Location
    Phoenix, AZ
    Posts
    22
    It's not that I don't want to use a Datagrid. The thing is I'm not allowed to use Datagrids for work projects. I know Scott Mitchell at '4guysfromrolla' had a great article about using them. I wrote him back for his opinion on this issue, and he suggested I lean on my lead in this case, but no dice. So, wheel-reinventing is required where I work.
    "Ignorance and prejudice and fear walk hand in hand" - 'Witch Hunt', by Rush

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Are you sure the person who said no to Datagrid understands what the DataGrid and a web form control is? Perhaps he is under the impression that the Datagrid is a Windows form ocx type control that is embedded into an IE browser? Is that what he might be thinking? If so, that is not how it works. Not to try to harp on it, but I just dont understand why your project leader would say no. All the Datagrid does is output an html table formatted data for you without having to hand code all that junk.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5
    Hyperactive Member
    Join Date
    Jan 2003
    Location
    Cape Cod, US
    Posts
    292
    Use the datagrid anyway... if your idiot boss is ignorant enough to say no then I'm sure you won't
    have a problem BS-ing him/her.

    After all why the heck are you being allowed to use .net?



  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    No kidding. If you cant use the Datagrid, I would assume he would say no to all the web form controls like the textbox and button and cant make your own web form templates. In which case, might as well go back to ASP classic.

    Seriously, find out why your boss says no. I just dont see any logical good reason.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Feb 2003
    Location
    Phoenix, AZ
    Posts
    22
    His main issue is that the presentation to the user is less dynamic on a datagrid; i.e. not enough flexibility in how it looks. We've been using tables w/in tables that are w/o borders, so that there are no visible lines in between rows and columns. It does look nice that way but it's a lot of work on both ends.

    Since I told him about the paging feature in datagrids, he seems more open to them now (he know what a datagrid is, he just hasn't really studied them in depth because he hasn't had the time). So now I'm the pointman for datagrids. He says if I can get it to look in a DataGrid like it does now then "Go for it".
    "Ignorance and prejudice and fear walk hand in hand" - 'Witch Hunt', by Rush

  8. #8
    Hyperactive Member
    Join Date
    Jan 2003
    Location
    Cape Cod, US
    Posts
    292
    Good so now you can wow him with the flexibility of a datagrid. Before you know it he'll be
    bringing you coffee and begging for a decent evauation!

    Look into template columns for what you what to accomplish with those embedded tables.

  9. #9
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    And for your information, you can make the datagrid look anyway you want. If you need any specific help, just ask. I bought the book from the guy at 4guysfromrolla, the ASP.NET Data Web Controls book. In that book, he has 3 or 4 different ways you can page the contents with the datagrid. You should really check it out, I thought it was a great book. I will use it for some time to come as a reference book. You could also hand it to your boss to do some reading on the data controls. VERY informative.

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Feb 2003
    Location
    Phoenix, AZ
    Posts
    22
    Fungi: That's funny. I'm more of a cocoa man myself though.

    hellswraith: Scott Mitchell shamelessly plugged his book to me in his last e-mail, but since you're recommending it as well, I might just break the bank to get it. Thing is at work we've been using the Wrox Press books for our programming needs, and we won't be able to do that anymore now that Wrox's parent is belly up. Guess it's time to look for new materials.
    "Ignorance and prejudice and fear walk hand in hand" - 'Witch Hunt', by Rush

  11. #11
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    The different ways he presented to page the data, IMO, made the book worth the buy. Go to your local book seller and check it out.

Posting Permissions

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



Click Here to Expand Forum to Full Width