Hi Shyam,
Thanks again. This swimlane and group node exactly suits my need. Can you please share the sample code which populates from code behind?
Thanks,
Karthick
Thank you Shyam for the code and the video sample. I also tried to create a diagram without the group based on the samples given. Now I am stuck with one issue on this. I get scroll bar If I add more horizontal swimlanes or if I add more phases. I tried adjusting the width and height of diagram_section, control_section styles. Also, adjusted the diagram height, width, scroll settings in code behind but still getting the vertical scroll bar. I faced issues with the width as well but i tried adjusting the offset values and it worked. Can you please hep on this?
Hi Shyam, Thanks for your help. I have the below code but getting the vertical scroll bar next to the diagram if the diagram size exceeds the browser page limit. Is it possible to avoid that since the page doesn't look nice if there are 2 scroll bars. Also, Is it possible to bind this diagram like treemap or chart, so that i cannot edit text, delete or rotate boxes?
function create(args) {
var diagram = $("#DiagramContent").ejDiagram("instance");
diagram.fitToPage();
}
Query |
Response |
Thanks for your help. I have the below code but getting the vertical scroll bar next to the diagram if the diagram size exceeds the browser page limit. Is it possible to avoid that since the page doesn't look nice if there are 2 scroll bars. |
We have modified the sample in which we have rendered the diagram scrollbars alone. Please refer to the sample below.
|
Also, Is it possible to bind this diagram like treemap or chart, so that i cannot edit text, delete or rotate boxes? |
Could you please confirm us whether you need to bind chart/treemap control in our diagram and could not be edited at runtime? If yes, please use Html node to achieve your requirement. please refer to the code example below. Also please refer to the sample attached above.
Code example:
<script id="Htmltemplate" type="text/x-jsrender">
<div id="container" style="width: 200px; height: 200px;"></div>
</script>
HtmlNode node = new HtmlNode();
node.Name = "html";
node.Width = 200;
node.Height = 200;
node.TemplateId = "Htmltemplate";
node.Constraints = NodeConstraints.PointerEvents;
node.OffsetX = 200;
node.OffsetY = 200;
diagram.Nodes.Add(node);
|
Hi Shyam,
I was not clear with my last question regarding binding the chart. sorry. I dont need to bind treemap or chart in the diagram. Right now, If i bind the diagram and run the application, I am able to edit the shape text or delete a shape etc from the browser. I dont want to do that. My diagram should not be editable in the browser.
Thanks,
Karthick
Thanks Shyam. Below line resolved my issue. Thanks a lot for your help.
model.Constraints = DiagramConstraints.Default & ~DiagramConstraints.PageEditable;
Thanks,
Karthick