The first step is to create html page and add links to the javascript files and css dependencies to your project. The jqxKanban widget requires the following files:
<script type="text/javascript"> $(document).ready(function () { $('#kanban').jqxKanban({ resources: resourcesAdapterFunc(), source: dataAdapter, columns: [ { text: "Backlog", dataField: "new" }, { text: "In Progress", dataField: "work" }, { text: "Done", dataField: "done" } ] }); });</script>
To get the result of a function after calling it, you can use the following syntax:$("#jqxKanban").jqxKanban('removeItem', 'id1');
To set a property(option), you need to pass the property name and value(s) in the jqxKanban's constructor.var column = $("#jqxKanban").jqxKanban('getColumn', 'dataField1');
To get a property(option), you need to pass the property name to the jqxKanban's constructor.$("#jqxKanban").jqxKanban({ headerHeight: 50 });
To bind to an event of a UI widget, you can use basic jQuery syntax. Let’s suppose that you want to get the selected date after the user clicks on a cell. The example code below demonstrates how to bind to the ‘valuechanged’ event of jqxKanban.var headerHeight = $("#jqxKanban").jqxKanban('headerHeight');
$('#jqxKanban').on('columnCollapsed', function (event) {});
<!DOCTYPE html><html lang="en"><head> <title id='Description'>Kanban Board.</title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxsortable.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxkanban.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script> <script type="text/javascript"> $(document).ready(function () { var fields = [ { name: "id", type: "string" }, { name: "status", map: "state", type: "string" }, { name: "text", map: "label", type: "string" }, { name: "tags", type: "string" }, { name: "color", map: "hex", type: "string" }, { name: "resourceId", type: "number" } ]; var source = { localData: [ { id: "1161", state: "new", label: "Combine Orders", tags: "orders, combine", hex: "#5dc3f0", resourceId: 3 }, { id: "1645", state: "work", label: "Change Billing Address", tags: "billing", hex: "#f19b60", resourceId: 1 }, { id: "9213", state: "new", label: "One item added to the cart", tags: "cart", hex: "#5dc3f0", resourceId: 3 }, { id: "6546", state: "done", label: "Edit Item Price", tags: "price, edit", hex: "#5dc3f0", resourceId: 4 }, { id: "9034", state: "new", label: "Login 404 issue", tags: "issue, login", hex: "#6bbd49" } ], dataType: "array", dataFields: fields }; var dataAdapter = new $.jqx.dataAdapter(source); var resourcesAdapterFunc = function () { var resourcesSource = { localData: [ { id: 0, name: "No name", image: "../../jqwidgets/styles/images/common.png", common: true }, { id: 1, name: "Andrew Fuller", image: "../../images/andrew.png" }, { id: 2, name: "Janet Leverling", image: "../../images/janet.png" }, { id: 3, name: "Steven Buchanan", image: "../../images/steven.png" }, { id: 4, name: "Nancy Davolio", image: "../../images/nancy.png" }, { id: 5, name: "Michael Buchanan", image: "../../images/Michael.png" }, { id: 6, name: "Margaret Buchanan", image: "../../images/margaret.png" }, { id: 7, name: "Robert Buchanan", image: "../../images/robert.png" }, { id: 8, name: "Laura Buchanan", image: "../../images/Laura.png" }, { id: 9, name: "Laura Buchanan", image: "../../images/Anne.png" } ], dataType: "array", dataFields: [ { name: "id", type: "number" }, { name: "name", type: "string" }, { name: "image", type: "string" }, { name: "common", type: "boolean" } ] }; var resourcesDataAdapter = new $.jqx.dataAdapter(resourcesSource); return resourcesDataAdapter; } $('#kanban').jqxKanban({ resources: resourcesAdapterFunc(), source: dataAdapter, columns: [ { text: "Backlog", dataField: "new" }, { text: "In Progress", dataField: "work" }, { text: "Done", dataField: "done" } ] }); }); </script><script async src="https://www.googletagmanager.com/gtag/js?id=G-2FX5PV9DNT"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-2FX5PV9DNT');</script></head><body> <div id="kanban"></div> </body></html>