Results 1 to 5 of 5

Thread: Problems With Editing Values In Datagrid...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    70

    Cool

    Hi again,

    I have a problem when editing values in a datagrid.
    I use the Sub....DataGrid1_BeforeUpdate(Cancel As Integer)
    ...to validate edited value. Problem is.. if the user types in a new value and presses the process button, without going to another datagrid field first, this sub is not triggered and the change does not appear to be recognised.

    Any help on this would be appreciated.

    Cheers Jonny

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    82
    You could use the BeforeColEdit and ColEdit functions of the grid to trap when the user is actually editing a cell in your grid.

    Adrian.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    70

    Cool

    I had a brief look at those but wasn't sure whether these actions accured before of after BeforeColUpdate. I also couldn't find an example in MSDN stuff.

    If anyone has some code example using BeforeColEdit or ColEdit with Datagrids that would be helpfull.

    Cheers Jonny

  4. #4
    Lively Member
    Join Date
    Oct 2000
    Location
    Leicestershire; ENGLAND
    Posts
    71
    I have previously had this problem before when using Visual RPG!

    The solution that I came up with was to use a "cmdProcess.SetFocus" at the beginning of the processing function. This caused the focus to be lost be the edit control, thus triggerring the validation routine.

    I guess the same might work with the dbGrid control - something about it has to work ...

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    70

    Cool

    That sounds like a cunning plan... I'll try that out

    Thats again Orpheus

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