12 Answers, 1 is accepted
0
Sergey
Top achievements
Rank 1
answered on 27 Jun 2012, 02:30 PM
I'm using AppointmentEditingEvent and set e.Cancel = true, but the dialogue still pops up.
0
Hello Sergey,
To disable dialogs from showing you need to handle the ShowDialog event in RadScheduleView.
More information on this topic in this article.
Greetings,
Vladi
the Telerik team
To disable dialogs from showing you need to handle the ShowDialog event in RadScheduleView.
More information on this topic in this article.
Greetings,
Vladi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Sergey
Top achievements
Rank 1
answered on 29 Jun 2012, 06:49 AM
This article describes how to disable all edit dialogs. Is it possible to disable edit dialogs only for jobs of specific category?
0
Hello Sergey,
In the ShowDialog event of the RadScheduleView the passed ShowDialogEventArgs e contains all of the appointment class information, you can use that argument to filter the wanted appointment category and set a true value to the Cancel property of that appointment.
Regards,
Vladi
the Telerik team
In the ShowDialog event of the RadScheduleView the passed ShowDialogEventArgs e contains all of the appointment class information, you can use that argument to filter the wanted appointment category and set a true value to the Cancel property of that appointment.
Regards,
Vladi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Sergey
Top achievements
Rank 1
answered on 29 Jun 2012, 01:06 PM
I can't find any of the appointment class information in ShowDialogEventArgs e. Can you tell me which property I should be looking at?
0
Hello Sergey,
In the ShowDialog event the passed ShowDialogEventArgs argument contains the property DialogViewModel that could be cast to AppointmentDialogViewModel. That viewModel contains all of the appointment class information which can be used to filter the appointment's category.
More detailed information on events in RadScheduleView in this article.
Regards,
Vladi
the Telerik team
In the ShowDialog event the passed ShowDialogEventArgs argument contains the property DialogViewModel that could be cast to AppointmentDialogViewModel. That viewModel contains all of the appointment class information which can be used to filter the appointment's category.
More detailed information on events in RadScheduleView in this article.
Regards,
Vladi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Sergey
Top achievements
Rank 1
answered on 03 Jul 2012, 06:38 AM
Thanks!
0
Sergey
Top achievements
Rank 1
answered on 03 Jul 2012, 07:48 AM
Sorry, I still cannot find the appointment category.
AppointmentDialogViewModel has only property Categories, which contains a list of two categories, none of which is correct one.
It does work, for example, in the AppointmentEditing event, where AppointmentEditingEventArgs argument contains the property Appointment, which has the property Category which always contains correct appointment category no matter which appointment I double click.
AppointmentDialogViewModel has only property Categories, which contains a list of two categories, none of which is correct one.
It does work, for example, in the AppointmentEditing event, where AppointmentEditingEventArgs argument contains the property Appointment, which has the property Category which always contains correct appointment category no matter which appointment I double click.
0
Sergey
Top achievements
Rank 1
answered on 06 Jul 2012, 01:58 PM
Anyone have any ideas? Should I submit a ticket?
0
Accepted
Hi Sergey,
Here is sample code representing the ShowDialog event handler that cancels the ShowDialog for appointments with Blue Category:
Hope this helps.
Kind regards,
Vladi
the Telerik team
Here is sample code representing the ShowDialog event handler that cancels the ShowDialog for appointments with Blue Category:
private
void
RadScheduleView_ShowDialog(
object
sender, Telerik.Windows.Controls.ShowDialogEventArgs e)
{
var viewModel = e.DialogViewModel
as
AppointmentDialogViewModel;
var currentAppointment = viewModel.Occurrence.Appointment
as
Task;
if
((currentAppointment.Category !=
null
) && (currentAppointment.Category.CategoryName ==
"Blue Category"
))
{
e.Cancel =
true
;
}
}
Hope this helps.
Kind regards,
Vladi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Sergey
Top achievements
Rank 1
answered on 09 Jul 2012, 12:28 PM
Aha, so it was Occurrence property! Thanks!
0
Sandi Markon
Top achievements
Rank 1
answered on 16 Jul 2012, 11:11 AM
You could also add "e.Handled = true" to your original attempt, Sergey, and it also shouldn't open up the dialog (it works in my case).