CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2000
    Location
    Brazil
    Posts
    28

    Click on the left column - DataGrid

    Hi,

    I'm in trouble with a DataGrid.

    If the user types something inside the columns of the last row of a DataGrid and then clicks on the left gray column (Row Selector) in another line, the consistence events (BeforeUpdate and BeforeColUpdate) of the last line are not verified.

    So, the record is inserted in the database and may contain undesired values.

    How can I avoid this inconvenience?

    Thanks in advance...

    Michel Jr.


    Some good Activex controls at my HP:
    http://www.geocities.com/michel_junior_hp/index.html

  2. #2
    Join Date
    Feb 2001
    Posts
    54

    Re: Click on the left column - DataGrid

    Hello Michel Jr:
    If I understand correctly, what you do after you make your changes is to click on any cell and then you can click the black arrow on the left to save your changes

    Please reply back so that I know I answered your question correctly
    Good Luck


  3. #3
    Join Date
    Aug 2000
    Location
    Brazil
    Posts
    28

    Re: Click on the left column - DataGrid

    Hi,

    After typing something in the last line of the Datagrid, if I click on the left gray column of another line (that black arrow), the validation events of the last line aren't executed.
    This cause the last line to be included in my table without validation, and may contain undesired data.

    How to avoid this behaviour?

    Thanks again...

    Michel Jr.

    Some good Activex controls at my HP:
    http://www.geocities.com/michel_junior_hp/index.html

  4. #4
    Join Date
    Feb 2001
    Posts
    54

    Re: Click on the left column - DataGrid

    Hello:

    After I make changes to my last row, I click a cell in table before I could click black arrow on the left to save my changes.

    Thank you



  5. #5
    Join Date
    Aug 2000
    Location
    Brazil
    Posts
    28

    Re: Click on the left column - DataGrid

    Hi,

    I also click a cell in table before I could click black arrow on the left to save my changes...This is the right way, I agree with you...

    But if the user inadvertently doesn't click a cell before clicking the black arrow on the left?
    That's what I want to prevent...I need a code to avoid this possibility, otherwise some undesired data may be updated in my table.

    Thanks again,

    Michel Jr.


    Some good Activex controls at my HP:
    http://www.geocities.com/michel_junior_hp/index.html

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

Featured