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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Swim Lane drop from palette not sizing properly

Thread ID:





117980 Jan 16,2015 12:27 AM UTC Jan 20,2015 05:32 AM UTC ASP.NET Web Forms 4
Tags: Diagram
Jim Jacobs
Asked On January 16, 2015 12:27 AM UTC


See the attached video for a demonstration of the issue.
The swimlane that is dropped is very small and does not even show the lane.
I have to drag it to get the size I want,

Here's how the palette item is created in code behind:

Lane horLane = CreateSwimLane("HorizLane", "horizontal", 140, 60);
private Lane CreateSwimLane(string name, string orientation, int width, int height)
        Lane swimLane = new Lane();
        swimLane.Name = name;
        swimLane.Header.Text = "";
        swimLane.Header.Width = 60;
        swimLane.Header.Height = 60;
        swimLane.Header.FillColor = "#C7D4DF";
        swimLane.Header.FontSize = 11;
        swimLane.Width = width;
        swimLane.Height = height;
        swimLane.Orientation = orientation;
        swimLane.FillColor = "#f5f5f5";
        swimLane.OffsetX = 60;
        swimLane.OffsetY = 60;
        return swimLane;

What am I doing wrong?



Attachment: Syncfusion__Swim_Lane_Drop_Issue_24aa5c68.zip

Shyam G [Syncfusion]
Replied On January 19, 2015 01:42 PM UTC

Hi Jim

Thanks for using Syncfusion products.

Please note that the lane rendered in the palette has it’s default value of width and height which is set in the code behind. Whenever we drag and drop the node(lane) from the palette into the diagram, then the node’s width and height will be based on the PreviewWidth and previewHeight. So we suggest you to set the width and height for the lane using the “nodeCollectionChange” event and this event triggers before the node gets added in the diagram. We have provided sample and code snippet below for your reference.

Code snippet:

DiagramContent.OnClientNodeCollectionChange = "nodecollectionchanged";

function nodecollectionchanged(args) {

if (args) {

            if (args.element && args.element.isSwimlane) {

                if (args.element.orientation == "horizontal") {

                    args.element.minHeight = 120;

                    args.element.minWidth = 450;


                if (args.element.orientation == "vertical") {

                    args.element.minHeight = 450;

                    args.element.minWidth = 120;


                diagram.updateNode(args.element.name, {});





Please let me know if any concerns.


Shyam G

Jim Jacobs
Replied On January 19, 2015 10:33 PM UTC

Hi Shya,

The code you provided works.  Thanks

However, subsequent lanes dropped on the swimlane do not size properly.
See the attached video.

How do I fix this?

Thanks again.


Attachment: Syncfusion__Lanes_Dropped_Not_Sized_Correctly__19Jan2015_15b4c23b.zip

Jim Jacobs
Replied On January 19, 2015 10:34 PM UTC

Shyam, sorry about leaving the "m" off your name.

Shyam G [Syncfusion]
Replied On January 20, 2015 05:32 AM UTC

Hi Jim

Thanks for the update

We have analyzed your requirement with our sample and we are unable to reproduce the reported issue at our end. Could you please provide us more details such as sample or share us a sample script file that you have used in your application or modify the below sample to reproduce the reported issue at our end?. This will help us to verify and provide better solution to you. please refer the below sample and video for your reference.


Video: http://www.syncfusion.com/downloads/support/directtrac/117980/nodelane2078322250.zip

Please let me know if any concerns.


Shyam G


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon