RadGanttview

0 Answers 27 Views
GanttView
Jean-Pierre
Top achievements
Rank 1
Jean-Pierre asked on 23 Dec 2021, 04:01 PM

Hi Telerik team

I just use the radganttview replacing our old GanttOCX. I have a question about links between tasks. We don't want to use links.

Is it possible that links are invisible in the GanttViewGraphicalviewElement ?

 

Thanks in advance for your answer.

Lance | Manager Technical Support
Telerik team
commented on 23 Dec 2021, 04:05 PM

Hi Jean-Pierre, There is no GanttView for UWP (Universal Windows Platform). Since your object name has an "Element" suffix, I'm going to assume you're referring to WinForms and will switch this post over to the UI for WinForms forum.

If I am incorrect, and you meant to open the post for WPF, please let me know by replying to this comment. I will go ahead an move it again for you.

Jean-Pierre
Top achievements
Rank 1
commented on 23 Dec 2021, 04:10 PM

Hi lance,

You're reason. It's a winform issue for me. It's nice to you to replace my ask for WPF.

 

Thanks a lot.

 

JP

Dess | Tech Support Engineer, Principal
Telerik team
commented on 24 Dec 2021, 09:27 AM

Hello, Jean-Pierre,

If you want to eliminate the links between the tasks in RadGanttView from the Telerik UI for WinForms suite, feel free to clear the RadGanttView.Links collection. Thus, no links will be available between the tasks and only the added task elements are expected to be displayed. It is also necessary to hide the link handles for the task elements in order to prevent adding new links to the tasks:

        private void RadGanttView1_GraphicalViewItemFormatting(object sender, GanttViewGraphicalViewItemFormattingEventArgs e)
        {
            GanttGraphicalViewBaseItemElement itemElement = e.ItemElement as GanttGraphicalViewBaseItemElement;
            if (itemElement != null)
            { 
                itemElement.LeftLinkHandleElement.PropertyChanged -= LeftLinkHandleElement_PropertyChanged;
                itemElement.LeftLinkHandleElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; 
                itemElement.LeftLinkHandleElement.PropertyChanged += LeftLinkHandleElement_PropertyChanged;

                itemElement.RightLinkHandleElement.PropertyChanged -= LeftLinkHandleElement_PropertyChanged;
                itemElement.RightLinkHandleElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                itemElement.RightLinkHandleElement.PropertyChanged += LeftLinkHandleElement_PropertyChanged;
            }
        }

        private void LeftLinkHandleElement_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            GanttViewTaskLinkHandleElement linkHanle = sender as GanttViewTaskLinkHandleElement;
            if (e.PropertyName == "Visibility" && linkHanle.Visibility == Telerik.WinControls.ElementVisibility.Visible)
            {
                linkHanle.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
            }
        }
I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

 

Jean-Pierre
Top achievements
Rank 1
commented on 24 Dec 2021, 03:32 PM

Thanks a lot Dess. I translate your solution in OpenEdge 4GL language and I'm pretty sure it will be ok for me.

No answers yet. Maybe you can help?

Tags
GanttView
Asked by
Jean-Pierre
Top achievements
Rank 1
Share this question
or