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

how to set the control as read-only

Hello,
 
How to set the control as read-only?
 
Thanks!

5 Replies

RA Riyaj Ahamed I Syncfusion Team July 11, 2012 12:21 PM UTC

Hi Jorge,

 

Thanks for your interest in Syncfusion products.

 

We analyzed your query, you can achieve this requirement by setting the ReadOnly property of “GanttGrid” as  True and IsEnabled property of “GanttChart” as false.

We have created the sample based on this and it can be downloaded from the following link.

 

Sample: ReadOnlyControl.zip

 

Note: We do not have support for the direct API to set the “GanttControl” as readonly as of now.

 

 

Please let us know if you require any further assistance on this.

 

Regards,

Riyaj Ahamed I



ReadOnlyControl_589c03dd.zip


RW Ronny Weil January 21, 2013 02:21 PM UTC

Hi Riyaj Ahamed I,

 

your solutions works but the control is now disable. That means:

 no tooltip

wrong color for text ( gray)

 

I need a solution where i can use tooltips.

 

Regards

 

Ronny  





RA Riyaj Ahamed I Syncfusion Team March 7, 2013 10:27 AM UTC

Hi Ronny,

 

Sorry for the inconvenience caused.

 

We have analyzed your query. When we set the “IsEnabled” property of the “UIElement” as “false” , the UIElement does not show the tooltip. This is the default behavior of Microsoft controls.

 

If you only need to disable the resizing, drag drop functionality of the GanttNode,  you can use the following events,

·         GanttControl.NodeDragCompleted

·         GanttControl.NodeResizingCompleted

 

By handling these events you can disable the resizing, drag drop functionality of the GanttNode.

 

Note: These events are included from our 10.3.0.43 version.

 

Please let us know if you have any concern.

 

Regards,

Riyaj Ahamed I



AH Alexander Heimonen October 23, 2013 12:28 PM UTC

How should the events be handled? I have tried something similiar to this because I can't prevent the actual event to be fired:

this.Gantt.NodeDragCompleted += GanttNodeDragCompleted;

private void GanttNodeDragCompleted(object sender, NodeDragAndDropEventArgs args)
{
    args.Node.X1 += args.HorizontalChange;
    args.Node.X2 += args.HorizontalChange;
}

But it has no effect, I guess I should somehow find the nodes in the Gantt Control and perform the change on them?


JG Jai Ganesh S Syncfusion Team October 24, 2013 12:04 PM UTC

Hi Alexander,

 

Thanks for using Syncfusion products.

 

We have analyzed your query.”GanttNode.X1” and “GanttNode.X2”  are properties ,which helps to position the GanttNode in the GanttChart area. Also X1 and X2 value are calculated internally by using GanttNode.StartTime and GanttNode.EndTime value. Hence the change occurs with  x1 and x2 values in NodeDragCompleted event and it was not reflected. However you can achieve your requirement by using the following event arguments  “args.StartTime”,”args.EndTime” .

 

Please let us know if you need further assistance.

 

Thank you,

Jai Ganesh S


Loader.
Live Chat Icon For mobile
Up arrow icon