simpleGrid是否需要其他下载? [英] Does the simpleGrid require additional downloads?

查看:80
本文介绍了simpleGrid是否需要其他下载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在HotTowel项目中尝试 simpleGrid .涉及到:

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

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

它引发了异常:

无法获取未定义或空引用的属性'viewModel'

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

我经过一步,发现ko.simpleGrid是未定义的.

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

是否必须添加任何其他文件,或者标准Knockout.js库中是否提供了simpleGrid?

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

推荐答案

检查小提琴( http://jsfiddle .net/rniemeyer/QSRBR/)在简单网格"示例中提供.它需要KO库+基因敲除.simpleGrid.1.3.js

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

您需要定义PageGridModel

And you need to define the PageGridModel

ko.applyBindings(new PagedGridModel(initialData));

这篇关于simpleGrid是否需要其他下载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆