This is a migrated thread and some comments may be shown as answers.

Disable draw relation in Gantt view

5 Answers 202 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Prolay
Top achievements
Rank 1
Prolay asked on 11 Dec 2012, 11:58 AM
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

5 Answers, 1 is accepted

Sort by
0
Accepted
Masha
Telerik team
answered on 17 Dec 2012, 04:09 PM
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.

0
Anne Lyon
Top achievements
Rank 1
answered on 10 Jan 2013, 10:03 AM
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
0
Miroslav Nedyalkov
Telerik team
answered on 11 Jan 2013, 05:20 PM
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.

0
Guilherme
Top achievements
Rank 1
answered on 14 May 2014, 01:27 PM
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 ?



[quote]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.

 
[/quote]
0
Masha
Telerik team
answered on 16 May 2014, 11:33 AM
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.
 
Tags
GanttView
Asked by
Prolay
Top achievements
Rank 1
Answers by
Masha
Telerik team
Anne Lyon
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Guilherme
Top achievements
Rank 1
Share this question
or