With reference to below question asked in stackoverflow
I have modified the fiddle created by john papa. Here is my updated fiddle
I have added New button and clicking on it i push new record.In click event of New button i have added below code
this.NewDetail = function(){
self.model.Things.push(new Thing(4, "Thing 4", self.model.CurrentDisplayThing)
);
self.model.CurrentDisplayThing(item);
};
But the new row doesnt show as higlighted. What should i do to make it highlighted. The new row added should be shown as higlighted in yellow color.
If you click on the New button you will see the following error in your browser javascript console:
Because you don’t have
itemin your method. In your case theitemshould be the newly createdThingso store it in a variable which you can nameitemand it will work fine.Here is an updated JSFIddle.