Skip to content

Instantly share code, notes, and snippets.

@bradgignac
Last active January 3, 2016 14:49
Show Gist options
  • Save bradgignac/8478799 to your computer and use it in GitHub Desktop.
Save bradgignac/8478799 to your computer and use it in GitHub Desktop.
Knockout Grid
collection = servo.collection(); // or simply ko.observableArray()
viewModel = ck.grid.observable(collection);
grid = ck.grid(viewModel, {
'foo': ck.grid.column('link', { sort: true }), // Sortable link column.
'bar': ck.grid.column('text', { sort: false }), // Non-sortable text column.
'someComputedColumn': ck.grid.column('text', { sort: function () {...} }) // Sortable text column with custom sort function.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment