Announcement

Collapse
No announcement yet.

Grid not scroll top when updaing record

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grid not scroll top when updaing record

    all,

    whenever updating a record on a FORM application and goes back to the grid, the grid it self scrolls up and I lose the view on the record I was working on. any ideas how to maintain the grid view ?

    Regards.

  • #2
    Try to make a modal form from your link. In that case your form pop's up and when you leave it the grid remains the same as it's not being refreshed.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Dear aducom,

      Thanks for the advice. Tried it but still the same.

      Regards.

      Comment


      • #4
        I just tried a few forms of myself: on a grid I went to page 3 and choose a record for edit. The form screen appears and I modified the record, save and click exit. Then I got back to the grid on page 3.

        I think you have a different situation?
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          yes aducom,

          my situation as follows:

          a. page of 100 records.
          b. scroll down to last record, you can see on screen like record 90-100
          c. edit record 100, save, exit
          d. grid refreshes and scrolls up to top

          This happens by default when server posts back (after the update i think), hence the grid refreshes to reflect new changes. The only way I can do it so far is to change the default exit button on the form with (window.close()) button, but i have to refresh the grid manually.

          any better ideas?

          cheers

          Comment


          • #6
            Ok, this is standard behaviour I'm affraid. I haven't tried it, but if it's acceptable that your modified record will be the first in the list after refresh you might consider playing with this. http://us1.php.net/mysql_data_seek

            It will point your cursor to your record. But it requires that you know which recordnumber it has. Couldn't find that, but I think that if you add a custom field and apply a sequence in the onrecord event to every record you might get the result you need?

            Just a few thoughts, hope it's helpful.
            Albert Drent
            aducom software netherlands
            scriptcase partner, reseller, support and (turn-key) development
            www.scriptcase.eu / www.scriptcase.nl

            Comment


            • #7
              thank you aducom, will try it.

              Comment

              Working...
              X