JayData integrates well with knockout. However, the sample codes I see all likes to bind a list of products to an observable array. That observable array is then render as a html table with a Save button, with each table row containing a single product and an Edit button. The user has to press the Edit button for that product, change the value (e.g. Title) and then press Save.
Here is one way to programmatically select a product to edit without requiring the user to press an Edit button.
Assume you have already done the .toArray() to an observable array (e.g. obProducts), you should do the following:
- loop through the observable array to find the observable product you want to edit.
- It is important to note that you are not trying to filter the jaydata entity products.
- assign the found observable product to the observable selectedItem. Remember to use the subscribe() to attach and detach the observable.innerInstance to the jaydata entity products.
Ping me if you are interested in seeing a sample.