1
我正在嘗試爲telerik調度程序的約會創建自定義添加頁面。我希望顯示我的頁面,而不是在調度程序中創建添加約會模板。我查看了高級插入模板,但我不認爲它允許重定向到自定義頁面。如何爲telerik調度程序添加自定義「添加約會」頁面?
我正在嘗試爲telerik調度程序的約會創建自定義添加頁面。我希望顯示我的頁面,而不是在調度程序中創建添加約會模板。我查看了高級插入模板,但我不認爲它允許重定向到自定義頁面。如何爲telerik調度程序添加自定義「添加約會」頁面?
這是我在WPF-用我假設你正在使用Silverlight所以因人而異:
//in your window's constructor, add:
Sched.AddHandler(AppointmentItemsControl.SelectionChangedEvent, new SelectionChangedEventHandler(ShowCustomApptForm), true);
//then handle the event like this:
public void ShowCustomApptForm(object sender, SelectionChangedEventArgs args)
{
if (args.AddedItems.Count > 0)
{
AppointmentSlot item = args.AddedItems[args.AddedItems.Count - 1] as AppointmentSlot;
if (item != null)
{
//Get the appointment object so we can access the UniqueID
Appointment SelAppt = (Appointment)item.Occurrence.Master;
//Open the custom form, passing the uniqueid to the constructor
MyCustomForm ApptFrm = new MyCustomForm(Convert.ToInt32(SelAppt.UniqueId));
ApptFrm.Show();
}
}
}