Paging & Sorting not working on a gridview results page

Discussion in 'ASP.NET / ASP.NET Core' started by landshark, Nov 27, 2010.

  1. I'm using asp.net 4.0 and working with the gridview control in expression web 4. I followed the tutorial on the http://www.homepagedoctor.com/Tutorials.htm website. Everything works fine, showing the first page of the results, except I cannot get the paging or sorting to work on the results page. When I click on the next page or a column to sort, the page comes up empty.

    I do have both paging and sorting checked and set to true, but nothing shows. Has anyone else run into this? Any help would be greatful.:D
     
  2. ...There's a lot to cover but yes several people here can help with this.
    First off, which data source are you using? Is it an Access DB?
    if so, this may require more code on the page postback event.
    The GridView control creates Link buttons, when click they go back to the data source.

    That's cool you're using Ex Web v4 with this, I love the way it handles code now.
    All the best,
    Mark
     
  3. Mark
    Thanks for the reply. Yes I'm using the Access Datasource with Access 2010.accdb extension. Any help would be greatly appreciated. I'm not a coding genuis but learning fast with asp.
     
  4. ...I'll give it a spin (will create a local project) but yes I suspect it is an Access DB issue.
    SQL Server gives you a 2-way handle, Access does not.
     
  5. ...I've been working with this on IIS7/ASP.NET v4

    Can see how to get past this and already spotted some things Ex Web v4 and VS2010 do differently.

    Need to ask, do you need the .accdb format?
    If you use the App_Data directory with the standard .mdb format this does work better.
     
  6. Sorry it took so long to reply. I did not get the email showing the forum update.

    Yes I would really like to keep using the .accdb format for that same reason. It has some very unique features built into it.

    Thanks.
     
  7. I've been trying to create a Webcast for this and Bruce discovered something that I'm sure hardly anyone using Access on-line is aware of yet.
    I can't at least find anything on the Web about this.
    There are two .accdb file versions, Access 2007 and Access 2010.
    The only Access version I have is 2010 and the .accdb file format it creates does not currently work on-line.
    I created the same code with an Access 2007 .accdb format and the same exact code works on-line.

    That really was driving me nuts. Kudos to Bruce for discovering this one.

    So as it stands right now I can only create examples with the .accdb format locally.

    I'll help where I can.
    All the best,
    Mark
     
  8. What kind of coding did you have to change with the 2007 database to keep the connection going to the second on the results page?

    Thanks
     
  9. None. Same code.
    2007 works, 2010 doesn't.
     
  10. That is wierd, because I'm actually using a access 2007 database template with access 2010. It must cross wires somewhere in the middle.

    Thanks for trying.
     

Share This Page