Problems during Page Load

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RobertTheProgrammer
    New Member
    • Aug 2007
    • 58

    Problems during Page Load

    Okay, here's another one for you. Hopefully I can articulate my problem well enough...

    I've got a GridView (with C# code behind) that is having some page load issues. Users can enter and manipulate data in the grid and occasionally this causes actions (such as record inserts, updates, validation, etc.) that require the data to rebind and the page to reload. My problem is that when this occurs, it causes the page to default directly to the beginning of the page. This can be pretty jarring and annoying.

    In other words, suppose scroll down to the bottom of the page and manipulate some data. I enter a value in a dropdown list, which then causes an event to fire to populate some other columns. This then requires a rebind/reload to show the new data. However, during the reload, the page now shows the top of the page again. I have to scroll down to the bottom again to see the row that I was just manipulating. It can get pretty annoying.

    Is there any way to prevent the page from resetting to the top on the reload?

    I didn't notice this until just recently when the values in my GridView exceeded the size of my page.

    Many thanks for any advice.

    Robert
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by RobertTheProgra mmer
    Okay, here's another one for you. Hopefully I can articulate my problem well enough...

    I've got a GridView (with C# code behind) that is having some page load issues. Users can enter and manipulate data in the grid and occasionally this causes actions (such as record inserts, updates, validation, etc.) that require the data to rebind and the page to reload. My problem is that when this occurs, it causes the page to default directly to the beginning of the page. This can be pretty jarring and annoying.

    In other words, suppose scroll down to the bottom of the page and manipulate some data. I enter a value in a dropdown list, which then causes an event to fire to populate some other columns. This then requires a rebind/reload to show the new data. However, during the reload, the page now shows the top of the page again. I have to scroll down to the bottom again to see the row that I was just manipulating. It can get pretty annoying.

    Is there any way to prevent the page from resetting to the top on the reload?

    I didn't notice this until just recently when the values in my GridView exceeded the size of my page.

    Many thanks for any advice.

    Robert
    there is a Property of your ASPX Page called
    MaintainScrollP ositionOnPostba ck you could try setting to true. Or if this doesn't work you could consider adding paging to your GridView to reduce the number of records displayed at one time.

    -Frinny

    Comment

    • RobertTheProgrammer
      New Member
      • Aug 2007
      • 58

      #3
      MaintainScrollP ositionOnPostba ck did the trick. Many thanks!

      Robert

      Comment

      Working...