BFX
I see some strange code in what you show, however see this sample.
See this sample
You have in your datagrid
1
3
5
When the users changes the 3 in a 4 and clicks the button, nothing happens
in the datagrid and in the dataset until that he changes the row or there is
done an endcurrentedit on the right datasource, what forces to push the
changes down in the datasource accoording to the bindingcontext.
There is in my opinion some strange code in what you show. I did not see it
the first time.
this.dsMachineTypes.GetChanges();
This is a result and would normally be after the endcurrentedit
If (this.dsMachineTypes.HasChanges())
DataSet dsChanges = this.dsMachineTypes.GetChanges();
(And than do the update with that dsChanges. Than the acceptchanges on the
original dataset is needed because the dataset with changes is a copy. In
the way you show it now with the original dataset is the acceptchanges
already done by the dataadapter)
I hope this helps,
Cor
"BFX" <bf***@hotmail.com> schreef in bericht
news:%2***************@TK2MSFTNGP09.phx.gbl...
Thaks for answer but I think problem is that dataset cannot get changes
when
user dont't press enter after edit datagrid cell.
But I don't see why EndCurrentEdit and SendKeys.Send("{ENTER}"); don't
cause
End Editing process on datagrid.
"Cor Ligthert" <no************@planet.nl> wrote in message
news:eu*************@TK2MSFTNGP10.phx.gbl... BFX.
>
> this.dsMachineTypes.GetChanges();
>
> this.grdMachineType.BindingContext[this.dsMachineTypes.MachineTypes].EndCurr > entEdit();
>
When you do the EndCurrentEdit than the dataset can probably get changes.
Therefore I would change these two rows from position.
Don't nock to hard on your head when you read this, I don't see often
directly this kind of mistakes in my own programs.
I hope this helps,
Cor