Wijmo UI for the Web
Quick Start
Show AllShow All
Hide AllHide All

In this quick start, you will learn how to add the Data module to an HTML project and how to bind data from a local array to a Grid widget using Knockout.

  1. To create a new HTML page in your favorite text editor, add the following code and save the document with an .html extension.

    Drop down and copy markup

  2. Add links to the dependencies and KnockOut to your HTML page within the <head> tags. Find the latest dependencies in the content delivery network (CDN) file at wijmo cdn.

    Drop down and copy references to paste inside the head tags

  3. Within the <body> tags, add markup like the following. This markup does a number of things:
    • The first <table> element includes a number of buttons that are bound to the functions we create in the script below.
    • The second <table> element creates the View, a wijgrid widget, and binds it to the data we create in the script below.

    Drop down and copy markup into the body section

  4. Within the <head> tags, below the references, add the following script, which does all of the following:
    • Creates a local array of six products.
    • Creates a ViewModel.
    • Creates the filter functions.
    • Creates the sort functions.
    • Creates the paging functions.
    • Creates the modification functions.
    • Applies the Knockout bindings and activates knockout.js

    Drop down and copy markup to paste inside the head tags

  5. Save your HTML file and open it in a browser. The widget appears like the following.

See Also

Concepts

How To

Reference

 
Support Options