Is there an easy way to copy a record and then start the edit for this record in one go?
During the copy some data might be changed before the record is added and edited.
I have setup a sample script here:
But I don't know how to go from there.
What I have done is take a simple grid, added a custom button in the command column and attached the click to a function inside my viewModel.
Here I can get the current dataItem, change the ProductName, set the ProductID to null and add it to the datasource and force a refresh of the grid.
But what happens is that the original item in the grid has the changed ProductName in it and a new record is added at the very end of the grid, without a ProductID.
How I get the edit started is also not known to me at this time.
Is there another way? Is there a sample for this somewhere (didn't find anything in the forum or with Google)?