We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Adding Swimlane to Diagram

I would like to know how to add a swimlane into the page via the aspx.cs page to load the swimlane at runtime.

I have been able to load nodes by creating them and subsequently adding them to the page via the following code:

DiagramWebControl.Model.Nodes.Add(Task1);

What is the way I can add a swimlane similarly?

1 Reply

SG Shyam G Syncfusion Team August 16, 2017 09:37 AM UTC

Hi Deshan, 
 
We have created a swimlane sample in which we have rendered the swimlane in symbol palette and the diagram. please refer to the sample below. 
 
 
  • Also please refer to the MVC help documentation below in which we have shown how to create a swimlane in class file. By the same way, you can create it in aspx.cs page.
  • But adding a swimlane in nodes collection differs in MVC and ASP.NET, please refer to the code example below in which we have shown how to add a swimlane in nodes collection in ASP.NET.
 
      Code example: 
      Aspx.cs page 
           //create swimlane 
            SwimLane swimlane = new SwimLane(); 
            swimlane.Type = "swimlane"; 
            swimlane.Name = "swimlane"; 
            //append swimlane in nodes collection 
            DiagramWebControl.Model.Nodes.Add(swimlane); 
 
 
Regards, 
Shyam G 


Loader.
Up arrow icon