Hagita
asked on
Changing value of bound datagridview cell
Hello experts, I am trying to set a value in datagridview via code. the grid is bound to a bounding source.
apparently the data base wont update. this is my code:
Dim row As DataRow = DirectCast(Me.TblLaborator yBindingSo urce1.Curr ent, DataRowView).Row
row("Nomicrosection") = lngNewSeedNoMicroSection
row("TestDate") = DateTime.Now
dtgLab.Item("Nomicrosectio n", i).Value = lngNewSeedNoMicroSection
dtgLab.Item("TestDate", i).Value = DateTime.Now
dtDataTable.GetChanges()
TblLaboratoryTableAdapter. Update(dtD ataTable.S elect(Noth ing, Nothing, DataViewRowState.Deleted))
TblLaboratoryTableAdapter. Update(dtD ataTable.S elect(Noth ing, Nothing, DataViewRowState.ModifiedC urrent))
TblLaboratoryTableAdapter. Update(dtD ataTable.S elect(Noth ing, Nothing, DataViewRowState.Added))
COCDataSet.tblLaboratory.A cceptChang es()
apparently the data base wont update. this is my code:
Dim row As DataRow = DirectCast(Me.TblLaborator
row("Nomicrosection") = lngNewSeedNoMicroSection
row("TestDate") = DateTime.Now
dtgLab.Item("Nomicrosectio
dtgLab.Item("TestDate", i).Value = DateTime.Now
dtDataTable.GetChanges()
TblLaboratoryTableAdapter.
TblLaboratoryTableAdapter.
TblLaboratoryTableAdapter.
COCDataSet.tblLaboratory.A
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I solved it without using experts advice. Thank you
Does it use multiple tables?
If so it may be that it is not updateable
mlmcc