Help us shape the 2021 DevExtreme Roadmap. Take our 5 minute survey.
Your search did not match any results.

Read Only Mode

The Diagram widget can operate in Read Only mode. In this mode, users are not permitted to edit a diagram; therefore, most of the UI elements are disabled. It is for this reason that the Toolbox and Properties panel in this demo are hidden.

To switch the Diagram widget to Read Only mode, set the readOnly option to true.

@(Html.DevExtreme().Diagram() .ID("diagram") .ReadOnly(true) ) <script type="text/javascript"> $(function () { $.ajax({ url: "@Url.Content("~/Content/SampleData/diagram-structure.json")", dataType: "text", success: function(data) { $("#diagram").dxDiagram("instance").import(data); } }); }); </script>
using System.Web.Mvc; using DevExtreme.MVC.Demos.Models.SampleData; namespace DevExtreme.MVC.Demos.Controllers { public class DiagramController : Controller { public ActionResult ReadOnly() { return View(); } } }
#diagram { height: 700px; }