Hi
When i make ajax call by initializing this way
$ajax({
success : function(data) {
// some data....
pageViewModel.rows().push(rowtoPush);
}
});
pageViewModel= new pageViewModel();
function pageViewModel(){
var self=this;
this.rows=ko.observableArray([]);
}
And my question is
When i run it first time it works good. When i do refresh the page with calling the same ajax that it added the same data in rows() addition to previous.
To solve that i used pageViewModel.rows([]);
By using this i able to make the empty rows() before calling the ajax. I am able to reset the array. But the data is not binding to the UI even it has the new data in rows().
How can i solve this???
pleas help me....