jQWidgets jqxKanban updateItem() Method
jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely supported framework. The jqxKanban is used for representing the kanban method for a project.
The updateItem() method is used for updating an item of the specified jqxKanban widget.
Syntax:
$('#jqxKanban').jqxKanban('updateItem', itemId, newContent);
Parameters: This method accepts two parameters that are illustrated below.
- itemId: This is the specified id of the item which is going to be updated.
- newContent: This is the specified new content for updating.
Return Values: This method does not return any values.
Linked Files: Download jQWidgets from the given link. In the HTML file, locate the script files in the downloaded folder.
<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”scripts/jquery.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxbuttons.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” src=”jqwidgets/jqx-all.js”></script>
Example: The below example illustrates the jQWidgets jqxKanban updateItem() method.
HTML
<!DOCTYPE html> < html lang = "en" > < head > < link rel = "stylesheet" href = "jqwidgets/styles/jqx.base.css" type = "text/css" /> < script type = "text/javascript" src = "scripts/jquery.js" > </ script > < script type = "text/javascript" src = "jqwidgets/jqxcore.js" > </ script > < script type = "text/javascript" src = "jqwidgets/jqxbuttons.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" src = "jqwidgets/jqx-all.js" > </ script > </ head > < body > < center > < h1 style = "color:green;" > w3wiki </ h1 > < h3 > jQWidgets jqxKanban updateItem() Method </ h3 > < div id = "jqx_Kanban" ></ div > < input type = "button" style = "margin: 5px;" id = "button_for_updateItem" value = "Update the above item" /> < div id = "log" ></ div > < script type = "text/javascript" > $(document).ready(function () { var Data = new $.jqx.dataAdapter({ localData: [ { id: "1", status: "new", Company_Name: "w3wiki", About: "It is a CS portal" } ], dataFields: [ { name: "id", type: "string" }, { map: "About", name: "tags", type: "string" }, { map: "Company_Name", name: "text", type: "string" }, { name: "status", type: "string" }, ] }); var Data_Function = function () { var Data_Adapter = new $.jqx.dataAdapter({ localData: [ { name: "name" }, ], }); return Data_Adapter; } $('#jqx_Kanban').jqxKanban({ width: 300, height: 110, resources: Data_Function(), source: Data, columns: [ { text: "Company", dataField: "new" } ] }); $("#button_for_updateItem").jqxButton({ width: 250 }); $('#button_for_updateItem').jqxButton(). click(function () { $('#jqx_Kanban').jqxKanban('updateItem', "1", { status: "new", text: "Amazon", tags: "E-commerce website", color: "red" }); }) }); </ script > </ center > </ body > </ html > |
Output:
Reference: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxkanban/jquery-kanban-api.htm?search=
Contact Us