Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Add new item when bound to knockout observable array.
posted

I am evaluating igniteUI for use in our project.  We use knockout heavily throughout for client behavior.  Is there an example that adds/deletes rows from a grid when that grid is bound to a knockout observablearray? 

Attached a working sample.  Going through the objects in VS, when adding an object to the bound observablearray the tmpDataSource of the grid contains the correct entries but the actual datasource/data/dataview objects never get refreshed even after calling dataBind(). 

Parents
No Data
Reply
  • 5105
    Offline posted

    Hi there,

    Look at what version of jQuery UI you are currently using. In any version < 1.9 there is a bug with the _createWidget method which creates a deep copy of any non-primitive option, thus creating a deep copy of the observableArray and no longer referring to the same instance as the rest of the elements. This does not happen with version 1.9 and up, the bug has been fixed so you can try switching to this version to see if the issue is still reproducible.

    Let us know whether this resolves your issue!

Children