Karl balshaw
Top achievements
Rank 1
Karl balshaw
asked on 02 Nov 2010, 04:33 PM
Hi,
I am using the scheduler in TimeLineView and create my appointments programmatically. I want the users to be able to amend the dates and duration of some of the appointments, but not others.
I have set the appointment.AllowEdit to false, but this doesn’t seem to work, as the user can still amend the appointment.
Any thoughts or suggestions
Karl
5 Answers, 1 is accepted
0
Hello Karl,
Thank you for writing.
You can use a custom EditAppointmentDialog which modifies only dates and duration. Please, take a look at the Scheduler >> Binding example in our Examples application. This example demonstrates how to add a custom field in the EditAppointmentDialog. In addition, you can read the available scheduler documentation here.
I hope this helps.
All the best,
Dobry Zranchev
the Telerik team
Thank you for writing.
You can use a custom EditAppointmentDialog which modifies only dates and duration. Please, take a look at the Scheduler >> Binding example in our Examples application. This example demonstrates how to add a custom field in the EditAppointmentDialog. In addition, you can read the available scheduler documentation here.
I hope this helps.
All the best,
Dobry Zranchev
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
Karl balshaw
Top achievements
Rank 1
answered on 08 Nov 2010, 03:01 PM
Thank you for your response, and I will be using the custom dialog box soon, however, this query was regarding directly amending the appointments.
The user can select an appointment, drag it to another date, or change the duration.
This is functionality I use and like, however, I am also adding appointments for reference, and as such do not want the user to be able to use this functionality.
I have set the AllowEdit to false on the appointment when I create it, but it still can be moved and changed directly (without the use of a dialog).
I hope this clears up my query, thanks ini advance
The user can select an appointment, drag it to another date, or change the duration.
This is functionality I use and like, however, I am also adding appointments for reference, and as such do not want the user to be able to use this functionality.
I have set the AllowEdit to false on the appointment when I create it, but it still can be moved and changed directly (without the use of a dialog).
I hope this clears up my query, thanks ini advance
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 09 Nov 2010, 02:12 PM
Hello Karl,
If you want to stop an individual appointment from moving, then you could use the following:
hope that helps
Richard
If you want to stop an individual appointment from moving, then you could use the following:
Private
Sub
RadScheduler1_AppointmentMouseDown(
ByVal
sender
As
System.
Object
,
ByVal
e
As
Telerik.WinControls.UI.SchedulerAppointmentMouseEventArgs)
Handles
RadScheduler1.AppointmentMouseDown
If
e.Appointment.Summary =
"Test"
Then
Me
.RadScheduler1.AllowAppointmentMove =
False
Me
.RadScheduler1.AllowAppointmentResize =
False
Else
Me
.RadScheduler1.AllowAppointmentMove =
True
Me
.RadScheduler1.AllowAppointmentResize =
True
End
If
End
Sub
hope that helps
Richard
0
Richard Slade
Top achievements
Rank 2
answered on 10 Nov 2010, 10:21 AM
Hello Karl,
How did you get on with this? If this has helped, may I ask you to mark as answer so others can find the solution too. If you need any other help, just let me know and I'll be happy to assist.
Thanks
Richard
How did you get on with this? If this has helped, may I ask you to mark as answer so others can find the solution too. If you need any other help, just let me know and I'll be happy to assist.
Thanks
Richard
0
Hello,
Thank you for writing.
Richard's solution is correct. You can do just one more thing to optimize the code:
This will avoid the resizing and dragging operations only if the appointment is not editable.
All the best,
Dobry Zranchev
the Telerik team
Thank you for writing.
Richard's solution is correct. You can do just one more thing to optimize the code:
void
radScheduler1_AppointmentMouseDown(
object
sender, SchedulerAppointmentMouseEventArgs e)
{
this
.radScheduler1.AllowAppointmentMove = e.Appointment.AllowEdit;
this
.radScheduler1.AllowAppointmentResize = e.Appointment.AllowEdit;
}
This will avoid the resizing and dragging operations only if the appointment is not editable.
All the best,
Dobry Zranchev
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