Reputation: 3492
I am looking for an example where i can show an observableArray as normal text with edit / delete links. Items can be added/edited from a separate form. I am not able to edit the record from edit link it add new record!
self.editItem = function (p) { //edit code ////??????? };
Upvotes: 1
Views: 9335
Reputation: 8487
As other mentioned in there answers, you should use with
binding for editing any particular record. Here i have created a demonstration according to your need.
Upvotes: 6
Reputation: 1313
You have to track the particular item which is going to be edit (have it observable) and use with binding. See full example in this answer (jsFiddle).
Upvotes: 2
Reputation: 5053
Not completely sure what you are asking but if you are wanting to put the values back into the edit boxes then try this:
self.editItem = function (p) {
self.FirstName(p.FirstName);
};
Will then just have to write your logic to check if it already exists
Upvotes: 1