Your search did not match any results.
Tree List

Web API Service

To access a Web API service from the client, use the createStore method from the DevExtreme.AspNet.Data extension. This extension also allows you to process data for DevExtreme components on the server. The server-side implementation is available under the TreeListTasksController.cs tab in the ASP.NET MVC and ASP.NET Core versions of this demo.

To notify the TreeList that data is processed on the server, set the remoteOperations property to true.

Copy to CodePen
$(function(){ var url = ""; $("#tree-list").dxTreeList({ dataSource:{ key: "Task_ID", loadUrl: url + "/Tasks", insertUrl: url + "/InsertTask", updateUrl: url + "/UpdateTask", deleteUrl: url + "/DeleteTask", onBeforeSend: function(method, ajaxOptions) { ajaxOptions.xhrFields = { withCredentials: true }; } }), remoteOperations: { filtering: true, sorting: true, grouping: true }, parentIdExpr: "Task_Parent_ID", hasItemsExpr: "Has_Items", expandedRowKeys: [1, 2], searchPanel: { visible: true }, headerFilter: { visible: true }, editing: { mode: "row", allowAdding: true, allowUpdating: true, allowDeleting: true }, showRowLines: true, showBorders: true, columnAutoWidth: true, wordWrapEnabled: true, columns: [{ dataField: "Task_Subject", minWidth: 250, validationRules: [{ type: "required" }] }, { dataField: "Task_Assigned_Employee_ID", caption: "Assigned", minWidth: 120, lookup: { dataSource:{ key: "ID", loadUrl: url + "/TaskEmployees" }), valueExpr: "ID", displayExpr: "Name" }, validationRules: [{ type: "required" }] }, { dataField: "Task_Status", caption: "Status", minWidth: 120, lookup: { dataSource: [ "Not Started", "Need Assistance", "In Progress", "Deferred", "Completed" ] } }, { dataField: "Task_Start_Date", caption: "Start Date", dataType: "date" }, { dataField: "Task_Due_Date", caption: "Due Date", dataType: "date" } ], onInitNewRow: function(e) { = "Not Started"; = new Date(); = new Date(); } }); });
<!DOCTYPE html> <html xmlns=""> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src=""></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href="" /> <script src=""></script> <script src=""></script> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="tree-list"></div> </div> </body> </html>
#tree-list { max-height: 640px; }