Does the simpleGrid require additional downloads?

。_饼干妹妹 提交于 2019-12-23 07:48:13

问题


I want to try the simpleGrid in a HotTowel project. When it came to:

this.gridViewModel = new ko.simpleGrid.viewModel({
        data: this.items, ....

it threw an exception:

Unable to get property 'viewModel' of undefined or null reference`

I stepped through and found that ko.simpleGrid is undefined.

Must any other files be added or is simpleGrid available from the standard Knockout.js library?


回答1:


Check the fiddle (http://jsfiddle.net/rniemeyer/QSRBR/) provides in the Simple Grid sample. It need the KO library + knockout.simpleGrid.1.3.js

And you need to define the PageGridModel

ko.applyBindings(new PagedGridModel(initialData));


来源:https://stackoverflow.com/questions/18507885/does-the-simplegrid-require-additional-downloads

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!