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
close icon

Creating a swimlane palette symbol from code behind (C#)

Hi,

A few weeks ago you provided me with a sample solution that demonstrated how swimlanes can work - a purely HTML page.
I would like to define the swimlane shapes in code behind (C#), using the following code:

 Node horizLane = new Node();
 horizLane.Name = "horizSwim";
 horizLane.FillColor = "#f5f5f5";
 horizLane.Height = 70;
 horizLane.Width = 130;
 horizLane.OffsetX = 65;
 horizLane.OffsetY = 60;
 horizLane.IsLane = true;
 horizLane.Orentation = "horizontal";

 //  header: =  { text: "HEADER", width: 60, fillColor: "#C7D4DF" }

There does not appear to be properties called IsLane or Orientation (or anything similar showing in the intellisense dropdown).
What am I doing wrong?

Thanks in advance

Jim


8 Replies

SG Shyam G Syncfusion Team November 4, 2014 11:39 AM UTC

Hi Jim

Thanks for using Syncfusion products.

We are glad to inform you that we have created a simple sample of swim lane in ASP.NET and attached below. Please note that the property “IsLane” and “Orientation”  defined in the class “Lane”. Please see the code snippet below.

        Lane lane = new Lane();

            lane.Name = name;

            lane.Height =100;

            lane.Width = 100;

            lane.OffsetX = 100;

            lane.OffsetY = 100;

            lane.IsLane = true;

            lane.Orientation = Orientation.Vertical;

please let me know if any concerns.

Regards,

Shyam G


Attachment: swimlane_sample_20e9ce13.zip


JJ Jim Jacobs November 6, 2014 02:14 PM UTC

Hi Shyam,

Well, I'm making progress in small steps.
I have looked at the swimlane sample in the 12.3.0.36 release and just copied the code behind that creates the palette entries for the 2 swimlane shapes.
That works fine and I see them in my palette.
I am not creating any lanes or shapes in my code behind - I want the user to do that.

The problem I am having is that when I drag a swimlane shape from the palette onto my canvas it immediately disappears.
This occurs in the latest releases of FireFox and Chrome.
IE actually throws the following exception (which perhaps the other 2 browsers are ignoring):

     Unhandled exception at line 942, column 37 in http://vs2013-jimv2/NavviaNewDev/Syncfusion/Scripts/DiagramBuilder/DiagramBuilder.js

     0x800a138f - JavaScript runtime error: Unable to get property 'length' of undefined or null reference


What am I doing wrong? 
Is there any documentation on swim lanes?  I can't find any in the online documentation.  Even something in draft would be welcomed.

Thanks for your continuing guidance.

Jim


SG Shyam G Syncfusion Team November 7, 2014 12:27 PM UTC

Hi Jim

Thanks for the update.

 

Query

Response

Well, I'm making progress in small steps.
I have looked at the swimlane sample in the 12.3.0.36 release and just copied the code behind that creates the palette entries for the 2 swimlane shapes.
That works fine and I see them in my palette.
I am not creating any lanes or shapes in my code behind - I want the user to do that.

The problem I am having is that when I drag a swimlane shape from the palette onto my canvas it immediately disappears.
This occurs in the latest releases of FireFox and Chrome.
IE actually throws the following exception (which perhaps the other 2 browsers are ignoring):

     Unhandled exception at line 942, column 37 in http://vs2013-jimv2/NavviaNewDev/Syncfusion/Scripts/DiagramBuilder/DiagramBuilder.js

     0x800a138f - JavaScript runtime error: Unable to get property 'length' of undefined or null reference


What am I doing wrong?  

We are glad to inform you that we have fixed the reported issue in “diagrambuilder.js” file of diagram builder sample. We suggest you to replace the “diagrambuilder.js” file in your diagram builder application.

 

Here is the diagrambuilder.js file

 

diagrambuilderjs

 

We have attached diagram builder sample below for your reference.

 

Sample:http://www.syncfusion.com/downloads/support/directtrac/general/swimlanediagrambuilder687939511.zip

 

Is there any documentation on swim lanes?  I can't find any in the online documentation.  Even something in draft would be welcomed.

We are currently preparing a drafted version of documentation for swim lane and we will provide you the documentation in two business days(11/11/2014).

 

Please let me know if any concerns.

Regards,

Shyam G


Attachment: swimlanediagrambuildersample_d71d3f97.zip


JJ Jim Jacobs November 10, 2014 08:45 PM UTC

Hi,

The new javascript file provided has fixed the error when dropping a swimlane on the canvas.
Thank you.

I look forward to the documentation.

Jim


SG Shyam G Syncfusion Team November 11, 2014 09:17 AM UTC

Hi Jim

Thanks for your patience.

 

Query

Response

Is there any documentation on swim lanes?  I can't find any in the online documentation.  Even something in draft would be welcomed.

Currently, We have provided drafted version of documentation for swimlane and attached below. We will inform you once it is hosted online.

Please let me know if any concerns.

Regards,

Shyam G



SG Shyam G Syncfusion Team November 11, 2014 09:19 AM UTC

Hi Jim

Please ignore our previous update.

 

Query

Response

Is there any documentation on swim lanes?  I can't find any in the online documentation.  Even something in draft would be welcomed.

Currently, We have provided drafted version of documentation for swimlane and attached below. We will inform you once it is hosted online.

Please let me know if any concerns.

Regards,

Shyam G


Attachment: swimlanedocumentation_b4396f84.zip


PE pentest30 replied to Jim Jacobs March 2, 2018 10:12 AM UTC

Hi Shyam,

Well, I'm making progress in small steps.
I have looked at the swimlane sample in the 12.3.0.36 release and just copied the code behind that creates the palette entries for the 2 swimlane shapes.
That works fine and I see them in my palette.
I am not creating any lanes or shapes in my code behind - I want the user to do that.

The problem I am having is that when I drag a swimlane shape from the palette onto my canvas it immediately disappears.
This occurs in the latest releases of FireFox and Chrome.
IE actually throws the following exception (which perhaps the other 2 browsers are ignoring):

     Unhandled exception at line 942, column 37 in http://vs2013-jimv2/NavviaNewDev/Syncfusion/Scripts/DiagramBuilder/DiagramBuilder.js

     0x800a138f - JavaScript runtime error: Unable to get property 'length' of undefined or null reference


What am I doing wrong? 
Is there any documentation on swim lanes?  I can't find any in the online documentation.  Even something in draft would be welcomed.

Thanks for your continuing guidance.

Jim

i agree with these terms


KR Kameshwaran R Syncfusion Team March 5, 2018 11:00 AM UTC

Hi Pentest, 

We have already fixed the reported issue on the diagram. Please check the below online diagram builder link. 


Regards, 
Kameshwaran R. 


Loader.
Live Chat Icon For mobile
Up arrow icon