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

Read-Only not supported?

7 Answers 259 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 04 Feb 2011, 09:37 AM
I woud need read only ScheduleView, but there isnĀ“t property IsReadOnly in RadScheduleView. Read-Only property is not supported in RadScheduleView? Or is it possible to do somehow RadScheduleView read only?

7 Answers, 1 is accepted

Sort by
0
Accepted
George
Telerik team
answered on 09 Feb 2011, 04:52 PM
Hi Pavel,

 
Thank you for contacting us.

Yes, it is possible to make read-only RadScheduleView control. Unfortunately, it is not so straightforward. You need to implement custom read-only DragAndDrop behavior for the RadScheduleView control. Override the CanDrop and CanResize methods and return false to each one. After that, handle the AppointmentCreating, AppointmentEditing and AppointmentDeleting events and set CancelRoutedEventArgs.Cancel to true. If you don't want to show the read-only EditAppointment dialog window, handle the ShowDialog event and set CancelRoutedEventArgs.Cancel to true as well.

We consider adding a property to the RadScheduleView to make the control read-only. 

Attached you can find the sample project. I hope this suit your needs.

Best wishes,
George
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Pavel
Top achievements
Rank 1
answered on 09 Feb 2011, 08:24 PM
Thank you very much for your help
0
Anoop
Top achievements
Rank 1
answered on 10 Feb 2011, 12:01 PM

Hi

I was trying your example,, however I get this error..

 

            The type or namespace name 'Xaml' does not exist in the namespace 'System' (are you missing an assembly reference?)

 

How can I resolve it?

 

Thanks a lot in advance

0
George
Telerik team
answered on 15 Feb 2011, 01:35 PM
Hi Anoop,

 
This happens because the project I sent you is in .NET 4.0, but you use .NET 3.5. I would suggest you to remove the System.Xaml assembly, because it is not available in the .NET 3.5 framework.

Greetings,
George
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Hamza
Top achievements
Rank 1
answered on 09 Apr 2011, 09:01 AM

Hello,
I've been using RadScheduleView too, and I needed this read-only functionality, but I couldn't do it as easily as it is in the RadScheduler.
Does the solution you proposed work the same way in Silverlight ?
Thanks
 
0
Yana
Telerik team
answered on 11 Apr 2011, 04:23 PM
Hello,

Please check our online example which demonstrate how to achieve read-only functionality in RadScheduleView. Also the approach is explained in this help article.

Hope this helps.

Greetings,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Hamza
Top achievements
Rank 1
answered on 11 Apr 2011, 04:39 PM

Hi,
I checked the online help, and the proposed approached works good for me. But I didn't like the greyed effect of the slots and the appointments. So, I followed the Wpf sample project George posted in this thread, and handled the editing, closing and adding events, and also handled the ShowDialog event to avoid showing message boxes and edit boxes. It works now just the way I wanted it to!

Thank you for your help.

Greetings
Tags
ScheduleView
Asked by
Pavel
Top achievements
Rank 1
Answers by
George
Telerik team
Pavel
Top achievements
Rank 1
Anoop
Top achievements
Rank 1
Hamza
Top achievements
Rank 1
Yana
Telerik team
Share this question
or