Disable draw relation in Gantt view

6 posts, 1 answers
  1. Prolay
    Prolay avatar
    27 posts
    Member since:
    Nov 2012

    Posted 11 Dec 2012 Link to this post

    Hi,

    I want to disable the draw relation feature in a particular Gantt View. How will i be able to achieve it.



    Thanks and Regards,
    Prolay
  2. Answer
    Masha
    Admin
    Masha avatar
    355 posts

    Posted 17 Dec 2012 Link to this post

    Hello Prolay,

    Sorry for the late reply.

    The easiest way to disable drag relations is to remove their definitions form the control template of EventDecoratorContainer inside RadGanttView. I demonstrated what changes should be implemented inside App.xaml in the attached file to achieve the approach.

    I hope it helps.

    All the best,
    Maria
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Anne Lyon
    Anne Lyon avatar
    87 posts
    Member since:
    Jan 2010

    Posted 10 Jan 2013 Link to this post

    Isn't there a simple way to make a GanttView ReadOnly? I don't want my user to either draw relations, move or resize any tasks.
    Anne
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 11 Jan 2013 Link to this post

    Hi Anne,

    Thank you for your feedback.

    Currently the easiest way to make the GanttView control read-only is using the theme - from it you can disable the drag&drop functionality and to hide the extra visuals, meant for editing. For future we will consider one stop solution for read-only mode.

    All the best,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Guilherme
    Guilherme avatar
    2 posts
    Member since:
    Mar 2014

    Posted 14 May 2014 in reply to Masha Link to this post

    HI Masha,

    You solution worked as planned. However, as far as I know, it modify the gantt behaviour in all pages of the application. 
    Is it possible to modify a specific gantt view, applying the style to the EventDecoratorContainer ?



    Masha said:Hello Prolay,

    Sorry for the late reply.

    The easiest way to disable drag relations is to remove their definitions form the control template of EventDecoratorContainer inside RadGanttView. I demonstrated what changes should be implemented inside App.xaml in the attached file to achieve the approach.

    I hope it helps.

    All the best,
    Maria
    the Telerik team
     

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

     
  7. Masha
    Admin
    Masha avatar
    355 posts

    Posted 16 May 2014 Link to this post

    Hi Prolay,

    You can defined different EventDecorator container styles as a separate style in a scope of RadGanttView. Please check the code snippet below:
    <telerik:RadGanttView Grid.Row="1" VisibleRange="{Binding VisibleRange}" TasksSource="{Binding Tasks}"
    PixelLength="00:30:00"
    HighlightedItemsSource="{Binding HighlightedItems}">
    <telerik:RadGanttView.Resources>
     
    <Style TargetType="telerik:EventDecoratorContainer">
        <Setter Property="telerik:ZIndexManager.ZIndex" Value="40" />
        <Setter Property="MilestoneContainerMargin" Value="-6 0" />
        <Setter Property="SummaryContainerMargin" Value="-4 0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="gantt:EventDecoratorContainer">
                ...
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    </telerik:RadGanttView.Resources>


    I hope this helps.

    Regards,
    Masha
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
DevCraft banner