javascript - Make koGrid respect observable properties -


I am writing an app with Cogrid, recently I have an array of objects in my array of nautical nockouts Changed objects However, when I update the attainable properties within my object, I am surprised that the grid is not updated.

This is my data array:

  self.gridData = ko.observableArray ([{name: Ko.SourceWeb ("who"), age: to .horsabel ( 5)}]);  

When I update the age property, nothing happens on the grid:

  self.gridData () [0] .ge (6) ;   

Update

I answered this question, but does anyone know why Cobrid will caching unnecessary values?

I looked at the Crogrid source and this line

  self GetProperty = function (path) {returns autoproperty caches [path] || (Auto property cache [path] = window.kg.utils.evalProperty (self element, path)); };  

It looks like a property cache that we are caching the unbundled value of the property which we are accessing in the default:

  Lt; Div data-bind = "Attr: {'class': 'kgCellText colt' + $ index ()}, html: $ data.getProperty ($ parent)" & gt; & Lt; / Div & gt;  

(Note: The template has a $ data column, in which the getProperty wrapper for the line is .getProperty)

I just want to cache the properties of the line Removed for:

  self.getProperty = function (path) {return window.kg.utils.evalProperty (auto path, path); };  

Comments