Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the simpleGrid require additional downloads?

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?

like image 732
Old Geezer Avatar asked Aug 29 '13 10:08

Old Geezer


1 Answers

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));
like image 172
Jonathan Anctil Avatar answered Oct 05 '22 02:10

Jonathan Anctil