Results 1 to 2 of 2

Thread: Funny problem updating the database

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2006
    Posts
    205

    Funny problem updating the database

    I have the following sub to change every cell in one column on a datagridview. I can see they all changed correctly. But then when I go update to to the database, for some funny reason, always the first cell on the column, has the old value updated into the database. Anybody know why?

    VB Code:
    1. Private sub changeDetailColumnValue()
    2.     Dim i as Integer
    3.     For i = 0 to (ds.Tables("myTable").Rows.Count - 1)
    4.         DetaGridView.Rows(i).Cells(3).Value = "Test Completed"
    5.     Next
    6. End Sub

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2006
    Posts
    205

    Re: Funny problem updating the database

    I noticed that since the row indicator is on the first row. After I changed the cell values, if I click on any other row on the datagridview, then I don't have this problem.

    Is it possible to move the row indicator down to the empty row after the last row?

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