Sanjaya Kodagoda
Top achievements
Rank 1
Sanjaya Kodagoda
asked on 02 Dec 2010, 05:09 AM
Hi
I want to load RadScheduler AppointmentEditDialog from custom menu click event.
I try to raise the RadScheduler1_AppointmentEditDialogShowing event in custom
menu click event by the following code;
Private Sub menuItem1_Click(ByVal sender As System.Object,
ByVal e As EventArgs)
Dim ep As New
Telerik.WinControls.UI.Scheduler.Dialogs.EditAppointmentDialog
Dim ev As
Telerik.WinControls.UI.IEvent
Dim evt As New
Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs(ev, ep)
RadScheduler1_AppointmentEditDialogShowing(Nothing,
evt)
End Sub
But the EditAppointmentDialog not loading. Please help me to do this
8 Answers, 1 is accepted
0
Richard Slade
Top achievements
Rank 2
answered on 02 Dec 2010, 11:06 AM
Hello,
this forum thread should have yuor answer.
I hope that helps, but let me know if you need more assistance
Richard
this forum thread should have yuor answer.
I hope that helps, but let me know if you need more assistance
Richard
0
Sanjaya Kodagoda
Top achievements
Rank 1
answered on 02 Dec 2010, 12:34 PM
Hi Richard
No that is not use full for me , My problem is different than that. I customize the RadScheduler1_ContextMenuShowing event and add new menu item. So I want to load the AppointmentEditDialog from the new menu. Same like the existing “New Appointment” menu
No that is not use full for me , My problem is different than that. I customize the RadScheduler1_ContextMenuShowing event and add new menu item. So I want to load the AppointmentEditDialog from the new menu. Same like the existing “New Appointment” menu
0
Hello Sanjaya Kodagoda,
Thank you for writing back.
RadScheduler contains a method that shows the EditAppointmentDialog, but it is not public. If you want to access it, you have to create a class that inherits RadScheduler and expose the new method that calls the existing one.
After the extended RadScheduler class is created, you should use instances of this custom class.
Feel free to write back if you have further questions.
Kind regards,
Dobry Zranchev
the Telerik team
Thank you for writing back.
RadScheduler contains a method that shows the EditAppointmentDialog, but it is not public. If you want to access it, you have to create a class that inherits RadScheduler and expose the new method that calls the existing one.
public
class
TestScheduler : RadScheduler
{
public
void
ShowEditAppointmentDialog(IEvent appointment,
bool
recurringAppointment)
{
this
.ShowAppointmentEditDialog(appointment, recurringAppointment);
}
}
After the extended RadScheduler class is created, you should use instances of this custom class.
Feel free to write back if you have further questions.
Kind regards,
Dobry Zranchev
the Telerik team
0
Shruti
Top achievements
Rank 1
answered on 05 Dec 2010, 08:03 AM
hi!!
I want to display the EditAppointmentDialog after clicking a button in other form(this form is different than the form where i have my radschedular)
I used the following code which was given by telerik team.
I am creating an instance of this class in the click event of a button as TestScheduler test = new TestScheduler();
for test
I want to display the EditAppointmentDialog after clicking a button in other form(this form is different than the form where i have my radschedular)
I used the following code which was given by telerik team.
public
class
TestScheduler : RadScheduler
{
public
void
ShowEditAppointmentDialog(IEvent appointment,
bool
recurringAppointment)
{
this
.ShowAppointmentEditDialog(appointment, recurringAppointment);
}
}
I am creating an instance of this class in the click event of a button as TestScheduler test = new TestScheduler();
for test
.ShowEditAppointmentDialog(IEvent appointment, bool recurringAppointment)
what parameters i should give? as no appointment is created yet and my EditAppoinmentDialog don't have recurrence control
Can you please tell me how i can display the EditAppointmentDialog when a button on other form is clicked?
0
Shruti
Top achievements
Rank 1
answered on 05 Dec 2010, 04:39 PM
Can anyone please help me with the above question?
0
Sanjaya Kodagoda
Top achievements
Rank 1
answered on 08 Dec 2010, 12:59 PM
HI,
thanks for the reply. this work fine but please let me know how to load the custom AppointmentEditDialog from custom menu click event.
thanks for the reply. this work fine but please let me know how to load the custom AppointmentEditDialog from custom menu click event.
0
Richard Slade
Top achievements
Rank 2
answered on 08 Dec 2010, 03:41 PM
Hello,
In order to launch a new appointment edit dialog from a menu or button perform the following:
Add a new class that inherits from RadScheduler
In your menu click
Hope that helps, but let me know if you need more information
Richard
In order to launch a new appointment edit dialog from a menu or button perform the following:
Add a new class that inherits from RadScheduler
Imports
Telerik.WinControls.UI
Public
Class
MyScheduler
Inherits
Telerik.WinControls.UI.RadScheduler
Public
Sub
New
()
Me
.ThemeClassName =
"Telerik.WinControls.UI.RadScheduler"
End
Sub
Public
Sub
ShowEditAppointmentDialog(
ByVal
appointment
As
IEvent,
ByVal
recurringAppointment
As
Boolean
)
MyBase
.ShowAppointmentEditDialog(appointment, recurringAppointment)
End
Sub
End
Class
In your menu click
Me
.MyScheduler1.ShowEditAppointmentDialog(
New
Appointment(
New
Date
(2010, 12, 10),
New
Date
(2010, 12, 11),
"Summary"
,
"Description"
),
False
)
Hope that helps, but let me know if you need more information
Richard
0
Hi guys,
Thank you for writing.
@Shruti, you can use the solution provided by Richard.
@Richard, thank you for your assistance. Your Telerik points have been updated for the cooperation.
@Sanjaya, you can replace the built-in EditAppointmentDialog with a custom one by handling the AppointmentEditDialogShowing event. For additional information, please refer to this article.
If you have additional questions, feel free to write us.
Best wishes,
Dobry Zranchev
the Telerik team
Thank you for writing.
@Shruti, you can use the solution provided by Richard.
@Richard, thank you for your assistance. Your Telerik points have been updated for the cooperation.
@Sanjaya, you can replace the built-in EditAppointmentDialog with a custom one by handling the AppointmentEditDialogShowing event. For additional information, please refer to this article.
If you have additional questions, feel free to write us.
Best wishes,
Dobry Zranchev
the Telerik team