Results 1 to 2 of 2

Thread: moving in data grid

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2002
    Posts
    17

    moving in data grid

    Hi VB Experts,

    Again.. with DBGrid ...

    please, i need the code which can do the following:
    when I click "Enter" in the active cell , the pointer moves down (let the active cell becomes the next row in the same column) exactly like "MS EXCEL". BUT when i reach the last Row , let the pointer moves till the first row in the same column.

    Thank you so much

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Hi

    Erm, would it be the list index property perhaps - To get to the first entry - use 0
    OR
    May be you need to get the ID of the current record and set the selected row of the dbgrid to the next ID - if you are on the last row - set the id to 0 or 1...
    OR
    A movenext...Last record reached (EOF) then Movefirst

    Just a couple of ideas

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

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