SpreadJS Documentation > Developer's Guide > Managing Data > Using SpreadJS with Knockout |
SpreadJS supports Knockout.
Knockout is a JavaScript MVVM library that makes it easier to create a rich, desktop-like user interface with JavaScript and HTML. Knockout uses observers to make the UI automatically stay in sync with the underlying data model, along with a powerful and extensible set of declarative bindings.
A Knockout binding consists of two items, the binding name and value, separated by a colon. For example:
<span data-bind="text: myMessage"></span>
SpreadJS requires custom bindings when using Knockout. Refer to http://knockoutjs.com/documentation for more information on custom bindings. The SpreadJS binding name is gcspread-sheets.
This example creates a custom binding.
JavaScript |
Copy Code
|
---|---|
//First define the binding value. //Bind SpreadJS to the html element to use Knockout. |