Your search did not match any results.
Diagram

Web API Service

DevExtreme Diagram is currently available as a community technology preview (CTP). Expected to officially ship in June 2020.

This demo shows the Diagram widget loading data from a Web API service.

@(Html.DevExtreme().Diagram() .ID("diagram") .Nodes(ns => ns .DataSource(d => d.Mvc() .Controller("DiagramEmployees") .LoadAction("Employees") .InsertAction("InsertEmployee") .UpdateAction("UpdateEmployee") .DeleteAction("DeleteEmployee") .Key("ID") .OnInserting("onInserting") ) .KeyExpr("ID") .TextExpr("Title") .ParentKeyExpr("HeadID") ) .Toolbox(t => t .Groups(g => g .Add().Category(DiagramShapeCategory.General).Title("General") ) ) ) <script type="text/javascript"> function onInserting(values) { values["ID"] = 0; values["HeadID"] = 0; values["Title"] = "New Position"; values["Prefix"] = "Mr"; values["FullName"] = "New Employee"; values["City"] = "LA"; values["State"] = "CA"; values["HireDate"] = new Date(); } </script>
using DevExtreme.NETCore.Demos.Models.SampleData; using Microsoft.AspNetCore.Mvc; namespace DevExtreme.NETCore.Demos.Controllers { public class DiagramController : Controller { public IActionResult WebAPIService() { return View(); } } }
#diagram { height: 725px; }