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
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.
Maria
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
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.
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.
Maria
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
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