30 Answers, 1 is accepted
0
Hi Dave Palmer,
Yes, it is possible. We will most probably have such an example very soon.
To do that you must do the following:
1. Inherit the default form (EditAppointmentDialog) and do your customization (you can even use the winforms designer for that).
In the above code I have added an additional check box and set the status (show time as) of the appointment to Tentative if it is unchecked or to Busy if it is checked. The strange way of accessing the combo box is because it is private currently. This will be changed for the upcoming Q1 2009 release.
2. Subscribe to AppointmentEditDialogShowing event of RadScheduler and substitute the default form with your customized one:
I hope this helps. Do not hesitate to write me back if you have further questions.
Regards,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Yes, it is possible. We will most probably have such an example very soon.
To do that you must do the following:
1. Inherit the default form (EditAppointmentDialog) and do your customization (you can even use the winforms designer for that).
public partial class CustomAppointmentEditDialog : EditAppointmentDialog |
{ |
private RadComboBox cmbShowTimeAs = null; |
public CustomAppointmentEditDialog() |
{ |
InitializeComponent(); |
this.cmbShowTimeAs = this.Controls["cmbShowTimeAs"] as RadComboBox; |
} |
private void chkConfirmed_ToggleStateChanged(object sender, StateChangedEventArgs args) |
{ |
this.cmbShowTimeAs.SelectedValue = (args.ToggleState == ToggleState.On) ? |
(int)AppointmentStatus.Busy : (int)AppointmentStatus.Tentative; |
} |
} |
In the above code I have added an additional check box and set the status (show time as) of the appointment to Tentative if it is unchecked or to Busy if it is checked. The strange way of accessing the combo box is because it is private currently. This will be changed for the upcoming Q1 2009 release.
2. Subscribe to AppointmentEditDialogShowing event of RadScheduler and substitute the default form with your customized one:
private IEditAppointmentDialog appointmentEditDialog = null; |
protected override void OnLoad(EventArgs e) |
{ |
base.OnLoad(e); |
this.radScheduler1.AppointmentEditDialogShowing += new EventHandler<AppointmentEditDialogShowingEventArgs>(radScheduler1_AppointmentEditDialogShowing); |
} |
void radScheduler1_AppointmentEditDialogShowing(object sender, Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs e) |
{ |
if (this.appointmentEditDialog == null) |
{ |
this.appointmentEditDialog = new CustomAppointmentEditDialog(); |
} |
e.AppointmentEditDialog = this.appointmentEditDialog; |
} |
I hope this helps. Do not hesitate to write me back if you have further questions.
Regards,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Praveen Rustagi
Top achievements
Rank 1
answered on 12 May 2009, 08:49 AM
How can i change the title of Edit Appointment Dialogue? Currently it is showing "Edit Appointment".
0
Hi Praveen Rustagi,
If the text that you want to change the title to is not defendant on the edited appointment, you do not need to subclass the appointment edit dialog. You can use a very simple localization provider like bellow:
However if the text depends on the appointment being edited, you will need to subclass the appointment edit dialog (see the code sample earlier in the same thread) and set the Text property in some overridden method.
Do not hesitate to write again if you have more questions or suggestions.
Regards,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
If the text that you want to change the title to is not defendant on the edited appointment, you do not need to subclass the appointment edit dialog. You can use a very simple localization provider like bellow:
protected override void OnLoad(EventArgs e) |
{ |
base.OnLoad(e); |
RadSchedulerLocalizationProvider.CurrentProvider = new CustomSchedulerLocalizationProvider(); |
} |
public class CustomSchedulerLocalizationProvider : RadSchedulerLocalizationProvider |
{ |
public override string GetLocalizedString(string id) |
{ |
if (id == RadSchedulerStringId.AppointmentDialogTitle) |
{ |
return "Custom appointment dialog"; |
} |
return base.GetLocalizedString(id); |
} |
} |
However if the text depends on the appointment being edited, you will need to subclass the appointment edit dialog (see the code sample earlier in the same thread) and set the Text property in some overridden method.
Do not hesitate to write again if you have more questions or suggestions.
Regards,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
kultman
Top achievements
Rank 2
answered on 30 Jun 2009, 03:01 PM
Is this possible in VB?
Can't seem to find Telerik.WinControls.UI.EditAppointmentDialog when using VB.NET
Can't seem to find Telerik.WinControls.UI.EditAppointmentDialog when using VB.NET
0
Hi kultman,
Yes, all things in this thread should be possible with VB.NET also. However, you will not be able to find the EditAppointmentDialog in the Telerik.WinControls.UI namespace (or at least you should not). It is in the Telerik.WinControls.UI.Scheduler.Dialogs namespace.
Did you read that this dialog is in that namespace in some help or KB article? If so, could you share with us which is it , so we can fix it?
Best wishes,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Yes, all things in this thread should be possible with VB.NET also. However, you will not be able to find the EditAppointmentDialog in the Telerik.WinControls.UI namespace (or at least you should not). It is in the Telerik.WinControls.UI.Scheduler.Dialogs namespace.
Did you read that this dialog is in that namespace in some help or KB article? If so, could you share with us which is it , so we can fix it?
Best wishes,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Steven Steven
Top achievements
Rank 1
answered on 01 Aug 2009, 03:28 AM
I'd like to create my own custom EditAppointments form. In your example and in the forum's members have described how to do it by inheriting the base form. This proves to not be viable as those controls are locked and I'm unable to delete them. I wanted to create my own form with unique fields. Is there an example of how to call a unique Edit Appointments form and build it from scratch?
I"ve got:
private void radScheduler1_AppointmentEditDialogShowing1(object sender, Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs e)
{
if (this.appointmentEditDialog == null)
{
this.appointmentEditDialog = new CustomAppointment();
}
e.AppointmentEditDialog = this.appointmentEditDialog;
}
But I can't seem to get this to work if I'm not inheriting the EditAppointmentDialog and if I do inherit, it will lock the original controls.
Thanks!
I"ve got:
private void radScheduler1_AppointmentEditDialogShowing1(object sender, Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs e)
{
if (this.appointmentEditDialog == null)
{
this.appointmentEditDialog = new CustomAppointment();
}
e.AppointmentEditDialog = this.appointmentEditDialog;
}
But I can't seem to get this to work if I'm not inheriting the EditAppointmentDialog and if I do inherit, it will lock the original controls.
Thanks!
0
Hello Steven,
Basically in order to make a completely new implementation of an appointment edit dialog you have to implement the IEditAppointmentDialog interface from scratch. But if you are assigning it to e.AppointmentEditDialog you have probably already done that. As I explained in this forum post it may not be a trivial task. It is also not clear what is not working in your current implementation. Could you elaborate more on that? If we know what exactly is not working we could suggest how it can be fixed.
And finally, regarding inheriting from the default appointment edit dialog, I am not sure if this will work for you, but you could try hiding (instead of deleting) the controls that you do not want.
Sincerely yours,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Basically in order to make a completely new implementation of an appointment edit dialog you have to implement the IEditAppointmentDialog interface from scratch. But if you are assigning it to e.AppointmentEditDialog you have probably already done that. As I explained in this forum post it may not be a trivial task. It is also not clear what is not working in your current implementation. Could you elaborate more on that? If we know what exactly is not working we could suggest how it can be fixed.
And finally, regarding inheriting from the default appointment edit dialog, I am not sure if this will work for you, but you could try hiding (instead of deleting) the controls that you do not want.
Sincerely yours,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Steven Steven
Top achievements
Rank 1
answered on 05 Aug 2009, 06:35 AM
Hi Jordan, thanks for the reply. I'm working on an appointment scheduler for a tanning salon. Basically the user will be able to select a piece of equipment they would like to schedule with, it would load the free/busy time in the calendar for that specific equipment. Depending on the equipment it would have a pre-determined appt. duration ie 20 min for one, 25 min for another. This would automatically show up in the appt dialog based on what they click on. The Appt. edit dialog would consist mainly of the Start Time, uneditable duration, their name which gets automatically put in since they logged in earlier, and a spot for notes if necessary. I figured just hiding most of the current options would be easiest, but then it would be most of them and I wasn't sure how to hide the labels as they are locked after inheriting the appointmenteditdialog. I wasn't sure how to reference for instance lblEndTime.visible = false;
Thanks again.
Steve
Thanks again.
Steve
0
Tiago
Top achievements
Rank 2
answered on 06 Aug 2009, 09:06 AM
Hi,
In the following code:
I get this errors:
Can you help?
Thanks,
Tiago
In the following code:
public partial class CustomAppointmentEditDialog : EditAppointmentDialog |
{ |
private RadComboBox cmbShowTimeAs = null; |
public CustomAppointmentEditDialog() |
{ |
InitializeComponent(); |
this.cmbShowTimeAs = this.Controls["cmbShowTimeAs"] as RadComboBox; |
} |
private void chkConfirmed_ToggleStateChanged(object sender, StateChangedEventArgs args) |
{ |
this.cmbShowTimeAs.SelectedValue = (args.ToggleState == ToggleState.On) ? |
(int)AppointmentStatus.Busy : (int)AppointmentStatus.Tentative; |
} |
} |
I get this errors:
Warning 1 'CRMOS.CustomAppointmentEditDialog.cmbShowTimeAs' hides inherited member 'Telerik.WinControls.UI.Scheduler.Dialogs.EditAppointmentDialog.cmbShowTimeAs'. Use the new keyword if hiding was intended. C:\Users\Tiago\Documents\Visual Studio 2008\Projects\CRMOS\CRMOS\CustomAppointmentEditDialog.cs 13 29 CRMOS Error 2 The name 'InitializeComponent' does not exist in the current context C:\Users\Tiago\Documents\Visual Studio 2008\Projects\CRMOS\CRMOS\CustomAppointmentEditDialog.cs 17 13 CRMOS Error 3 The name 'ToggleState' does not exist in the current context C:\Users\Tiago\Documents\Visual Studio 2008\Projects\CRMOS\CRMOS\CustomAppointmentEditDialog.cs 24 69 CRMOS |
Can you help?
Thanks,
Tiago
0
Tiago
Top achievements
Rank 2
answered on 06 Aug 2009, 09:32 AM
Dear friends,
My problem is solved!! Insted of doing that ... i simple inherit the EditAppointmentDialog and used the form designer to make all changes.
Many thanks!!
My problem is solved!! Insted of doing that ... i simple inherit the EditAppointmentDialog and used the form designer to make all changes.
Many thanks!!
0
Hello Steve,
Currently the labels are private and the edit controls are protected. You can access any of the labels by name as in the sample below. You will also need to override the LoadSettingsFromEvent method of the EditAppointmentDialog in order to override the settings of the end time controls:
All the best,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Currently the labels are private and the edit controls are protected. You can access any of the labels by name as in the sample below. You will also need to override the LoadSettingsFromEvent method of the EditAppointmentDialog in order to override the settings of the end time controls:
protected override void LoadSettingsFromEvent(IEvent ev) |
{ |
base.LoadSettingsFromEvent(ev); |
this.dateEnd.Visible = false; |
this.timeEnd.Visible = false; |
this.Controls["lblEndTime"].Visible = false; |
} |
All the best,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Steven Steven
Top achievements
Rank 1
answered on 11 Aug 2009, 07:49 PM
Great, I've got most of it all built and functioning. The custom form is loaded and integrates with my custom fields in the data source. However after clicking the save button within the Edit Appointment Dialogue it throws this error, "cannot clear list." Any ideas?
A first chance exception of type 'System.ArgumentException' occurred in System.Data.dll
ERROR: System.ArgumentException: Cannot clear this list.
at System.Data.DataView.System.Collections.IList.Clear()
at Telerik.WinControls.UI.Scheduler.SimpleResourceIdMapper.ClearResourceIds()
at Telerik.WinControls.UI.SchedulerBindingDataSource.EventBindingProvider.ProcessSchedulerItem(IEvent schedulerItem, Object dataSourceItem, SchedulerMapping mapping, PropertyDescriptor dataItemProperty)
at Telerik.WinControls.UI.Scheduler.BindingProviderBase`1.UpdateDataItemProperties(Object item, T schedulerItem)
at Telerik.WinControls.UI.Scheduler.BindingProviderBase`1.Insert(T itemToInsert)
at Telerik.WinControls.UI.RadScheduler.OnAddAppointments(IList list)
at Telerik.WinControls.UI.RadScheduler.appointments_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index)
at Telerik.WinControls.Data.ObservableCollection`1.InsertItem(Int32 index, T item, Action`1 approvedAction)
at Telerik.WinControls.Data.ObservableCollection`1.InsertItem(Int32 index, T item)
at Telerik.WinControls.UI.SchedulerAppointmentCollection.InsertItem(Int32 index, IEvent item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at Telerik.WinControls.UI.DayViewAppointmentsTable.cell_DoubleClick(Object sender, EventArgs e)
at Telerik.WinControls.RadItem.OnDoubleClick(EventArgs e)
at Telerik.WinControls.RadItem.DoDoubleClick(EventArgs e)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.RadScheduler.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsFormsApplication11.Program.Main() in C:\Users\theone\Documents\Visual Studio 2008\Projects\WindowsFormsApplication11\WindowsFormsApplication11\Program.cs:line 21
The thread 0x1358 has exited with code 0 (0x0).
The thread 0x12f0 has exited with code 0 (0x0).
The program '[5008] WindowsFormsApplication11.vshost.exe: Managed' has exited with code 0 (0x0).
A first chance exception of type 'System.ArgumentException' occurred in System.Data.dll
ERROR: System.ArgumentException: Cannot clear this list.
at System.Data.DataView.System.Collections.IList.Clear()
at Telerik.WinControls.UI.Scheduler.SimpleResourceIdMapper.ClearResourceIds()
at Telerik.WinControls.UI.SchedulerBindingDataSource.EventBindingProvider.ProcessSchedulerItem(IEvent schedulerItem, Object dataSourceItem, SchedulerMapping mapping, PropertyDescriptor dataItemProperty)
at Telerik.WinControls.UI.Scheduler.BindingProviderBase`1.UpdateDataItemProperties(Object item, T schedulerItem)
at Telerik.WinControls.UI.Scheduler.BindingProviderBase`1.Insert(T itemToInsert)
at Telerik.WinControls.UI.RadScheduler.OnAddAppointments(IList list)
at Telerik.WinControls.UI.RadScheduler.appointments_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedAction action, Object item, Int32 index)
at Telerik.WinControls.Data.ObservableCollection`1.InsertItem(Int32 index, T item, Action`1 approvedAction)
at Telerik.WinControls.Data.ObservableCollection`1.InsertItem(Int32 index, T item)
at Telerik.WinControls.UI.SchedulerAppointmentCollection.InsertItem(Int32 index, IEvent item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at Telerik.WinControls.UI.DayViewAppointmentsTable.cell_DoubleClick(Object sender, EventArgs e)
at Telerik.WinControls.RadItem.OnDoubleClick(EventArgs e)
at Telerik.WinControls.RadItem.DoDoubleClick(EventArgs e)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.RadScheduler.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsFormsApplication11.Program.Main() in C:\Users\theone\Documents\Visual Studio 2008\Projects\WindowsFormsApplication11\WindowsFormsApplication11\Program.cs:line 21
The thread 0x1358 has exited with code 0 (0x0).
The thread 0x12f0 has exited with code 0 (0x0).
The program '[5008] WindowsFormsApplication11.vshost.exe: Managed' has exited with code 0 (0x0).
0
Hi Steven Steven,
I will need to take a look at your data objects that you bind to RadScheduler in order to be sure what really happens. But it seems that the list property of the appointment that contains the resource ids cannot be cleared (for some reason its Clear method is implemented to throw an exception).
If this does not help it will be best if you can send a sample project that reproduces the issue. If you cannot for some reason send a project I will need at least the code for your data objects.
All the best,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I will need to take a look at your data objects that you bind to RadScheduler in order to be sure what really happens. But it seems that the list property of the appointment that contains the resource ids cannot be cleared (for some reason its Clear method is implemented to throw an exception).
If this does not help it will be best if you can send a sample project that reproduces the issue. If you cannot for some reason send a project I will need at least the code for your data objects.
All the best,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ramiro
Top achievements
Rank 1
answered on 16 Sep 2009, 10:00 PM
Hi,
Please, tell me How can I move or change the name of the elements that are blocked in the form inherited Edit Appointment ??
Thank you
Ramiro
Please, tell me How can I move or change the name of the elements that are blocked in the form inherited Edit Appointment ??
Thank you
Ramiro
0
Hello Ramiro,
Do I understand correctly that by "blocked" you mean the private elements in the edit appointment dialog form, like the labels?
You can access those elements / controls by name using the Controls collection, like bellow:
this.Controls["lblEndTime"].Visible = false;
You can find the complete sample earlier in this thread.
Also, if you only need to change the texts of the labels you can do that even without creating an inherited form using a localization provider (again, see earlier in this thread).
Kind regards,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Do I understand correctly that by "blocked" you mean the private elements in the edit appointment dialog form, like the labels?
You can access those elements / controls by name using the Controls collection, like bellow:
this.Controls["lblEndTime"].Visible = false;
You can find the complete sample earlier in this thread.
Also, if you only need to change the texts of the labels you can do that even without creating an inherited form using a localization provider (again, see earlier in this thread).
Kind regards,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ramiro
Top achievements
Rank 1
answered on 23 Sep 2009, 05:40 AM
Hi, thank you for the explication, it was very exact and it help me with my proyect.
thank you again.
thank you again.
0
Will
Top achievements
Rank 1
answered on 16 Oct 2009, 11:00 PM
Edit: Im using VS2008 VB.net (C# is not an option at this point or i would have been done days ago)
I am using RadScheduler and i want to add some options to it (such as client being booked, ane employee being booked. I have successfully inherited the edit appointments form, i think, but its empty. No controls are on the form.
Can someone demonstrate how to edit the default "edit appointment dialog" to add a couple of controls to it? I would really appreciate it.
Thank you
-AC
I am using RadScheduler and i want to add some options to it (such as client being booked, ane employee being booked. I have successfully inherited the edit appointments form, i think, but its empty. No controls are on the form.
Can someone demonstrate how to edit the default "edit appointment dialog" to add a couple of controls to it? I would really appreciate it.
Thank you
-AC
0
Hello Will H,
Please see the response to your question in this forum thread:
http://www.telerik.com/community/forums/winforms/scheduler/how-to-change-the-quot-edit-appointment-dialog-windows-quot-labels-and-dropdownlist-value.aspx
Sincerely yours,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Please see the response to your question in this forum thread:
http://www.telerik.com/community/forums/winforms/scheduler/how-to-change-the-quot-edit-appointment-dialog-windows-quot-labels-and-dropdownlist-value.aspx
Sincerely yours,
Jordan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
javas
Top achievements
Rank 1
answered on 20 Dec 2009, 10:44 PM
Hi,
how it is possible to get specific start and end time, when i click on a cell and use CustomAppointmentEditDialog. I meant my CustomAppointmentEditDialog does not fill in with a information from scheduler.
how it is possible to get specific start and end time, when i click on a cell and use CustomAppointmentEditDialog. I meant my CustomAppointmentEditDialog does not fill in with a information from scheduler.
0
Hello javas,
If you want to get the selection's start date and end date which are used to populate the RadScheduler dialog, then you can do the following:
1. Subscribe to the AppointmentEditDialogShowing event.
2. In the event handler, you need to iterate through the cells and then save the start and end date from the selected cells.
void radScheduler_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
{
SchedulerDayViewElement dayView = this.radScheduler.SchedulerElement.ViewElement as SchedulerDayViewElement;
List<SchedulerCellElement> cells = SchedulerUIHelper.GetCells(dayView.DataAreaElement.Table.Children);
List<SchedulerCellElement> selectedCells = new List<SchedulerCellElement>();
DateTime startSelectedDate = DateTime.MaxValue;
DateTime endSelectedDate = DateTime.MinValue;
foreach (SchedulerCellElement cell in cells)
{
if (cell.Selected)
{
startSelectedDate = startSelectedDate > cell.Date ? cell.Date : startSelectedDate;
endSelectedDate = endSelectedDate < cell.Date ? cell.Date : endSelectedDate;
selectedCells.Add(cell);
}
}
}
Please let me know if you need more assistance.
I hope this helps.
All the best,
Boyko Markov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
If you want to get the selection's start date and end date which are used to populate the RadScheduler dialog, then you can do the following:
1. Subscribe to the AppointmentEditDialogShowing event.
2. In the event handler, you need to iterate through the cells and then save the start and end date from the selected cells.
void radScheduler_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
{
SchedulerDayViewElement dayView = this.radScheduler.SchedulerElement.ViewElement as SchedulerDayViewElement;
List<SchedulerCellElement> cells = SchedulerUIHelper.GetCells(dayView.DataAreaElement.Table.Children);
List<SchedulerCellElement> selectedCells = new List<SchedulerCellElement>();
DateTime startSelectedDate = DateTime.MaxValue;
DateTime endSelectedDate = DateTime.MinValue;
foreach (SchedulerCellElement cell in cells)
{
if (cell.Selected)
{
startSelectedDate = startSelectedDate > cell.Date ? cell.Date : startSelectedDate;
endSelectedDate = endSelectedDate < cell.Date ? cell.Date : endSelectedDate;
selectedCells.Add(cell);
}
}
}
Please let me know if you need more assistance.
I hope this helps.
All the best,
Boyko Markov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
JJ
Top achievements
Rank 1
answered on 01 Apr 2010, 05:57 PM
Public Sub New() |
'InitializeComponent() |
Me.cmbShowTimeAs = TryCast(Me.Controls("cmbShowTimeAs"), RadComboBox) |
End Sub |
Error 1 'Telerik.WinControls.UI.Scheduler.Dialogs.EditAppointmentDialog.Private Sub InitializeComponent()' is not accessible in this context because it is 'Private'. C:\Documents and Settings\Masood\My Documents\Projects\RadControlsWinFormsApp1\RadControlsWinFormsApp1\Form1.vb 14 9 RadControlsWinFormsApp1
Private Sub chkConfirmed_ToggleStateChanged(ByVal sender As Object, ByVal args As StateChangedEventArgs) |
Me.cmbShowTimeAs.SelectedValue = If((args.ToggleState = ToggleState.[On]), DirectCast(AppointmentStatus.Busy, Integer), DirectCast(AppointmentStatus.Tentative, Integer)) |
End Sub |
I copied the C# code and used the converter to change to VB, Trying to customize the Edit Appointment Dialoge using VS2005
Thanks
JJ
0
Hi JJ,
Thank you for writing.
Please, review the example, which is installed with the controls, namely Scheduler >> Binding. It comes with VB code as well. You can take a closer look at the how to inherit EditAppointmentDialog.
Greetings,
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.
Thank you for writing.
Please, review the example, which is installed with the controls, namely Scheduler >> Binding. It comes with VB code as well. You can take a closer look at the how to inherit EditAppointmentDialog.
Greetings,
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
Rakesh
Top achievements
Rank 1
answered on 22 Jun 2010, 06:48 PM
Hi,
Instead of opening telerik new appointment window, I want to open some other custom window. how would I be able to override the edit appointment dialogbox?
Thanks,
Rakesh
Instead of opening telerik new appointment window, I want to open some other custom window. how would I be able to override the edit appointment dialogbox?
Thanks,
Rakesh
0
Hi Rakesh,
Thank you for writing. Please, take a look in this help article for the custom EditAppointmentDialog.
If you have other questions feel free to contact us.
Sincerely yours,
Dobry Zranchev
the Telerik team
Thank you for writing. Please, take a look in this help article for the custom EditAppointmentDialog.
If you have other questions feel free to contact us.
Sincerely yours,
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
cooper
Top achievements
Rank 1
answered on 04 Aug 2010, 09:43 AM
hi .. is it possible to edit all the labels in the edit appointment dialog using LocalizationProvider or we can just edit a single label text??
0
Hi cooper,
Thank you for writing. You could localize all of the label string in the dialog. See the documentation for more information.
Regards,
Dobry Zranchev
the Telerik team
Thank you for writing. You could localize all of the label string in the dialog. See the documentation for more information.
Regards,
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
Karthik
Top achievements
Rank 1
answered on 19 May 2016, 05:02 AM
Hello,
How can I populate my second combobox based on first combobox selected item/value in Custom EditAppointment using MVVM?
And how to save the Combobox data fromCustom EditAppointment. I have tried using this function radScheduleView_AppointmentCreated(object sender, Telerik.Windows.Controls.AppointmentCreatedEventArgs e), but i am not getting the combobox data in AppointmentCreatedEventArgs.
Attached an screenshot for scenario.
0
Hello Karthik,
Thank you for writing.
I would like to note that this forum thread is related to RadScheduler from the Telerik UI for WinForms suite. However, your question seems to be regarding the WPF's scheduler. Feel free to post your question in the relevant forum: http://www.telerik.com/forums/wpf
Thank you.
Regards,
Dess
Telerik
Thank you for writing.
I would like to note that this forum thread is related to RadScheduler from the Telerik UI for WinForms suite. However, your question seems to be regarding the WPF's scheduler. Feel free to post your question in the relevant forum: http://www.telerik.com/forums/wpf
Thank you.
Regards,
Dess
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Nick
Top achievements
Rank 1
answered on 17 Jun 2019, 11:16 AM
Is there an event I can hook into when the user clicks the Ok button on the appointment editor. I'd like to hook into that event to run additional checks on the appointment data before it's committed. For example, if the appointment dates overlap an existing appointment for the given resource, tell the user and cancel adding/editing that appointment.
0
Hello, Nick,
In order to cover your case, I would recommend you to create a custom EditAppointmentDialog. You can override its ValidateInput method where you can provide any additional validation in addition to the basic logic. Return true/false depending on the validity of your data. When the OK button is clicked, the ValidateInput method is called and if it fails, the data is not applied to the appointment.
The following help article demonstrates a sample approach how to create a custom edit dialog and replace the default one with this custom dialog: https://docs.telerik.com/devtools/winforms/controls/scheduler/appointments-and-dialogs/adding-a-custom-field-to-the-editappointment-dialog
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
In order to cover your case, I would recommend you to create a custom EditAppointmentDialog. You can override its ValidateInput method where you can provide any additional validation in addition to the basic logic. Return true/false depending on the validity of your data. When the OK button is clicked, the ValidateInput method is called and if it fails, the data is not applied to the appointment.
The following help article demonstrates a sample approach how to create a custom edit dialog and replace the default one with this custom dialog: https://docs.telerik.com/devtools/winforms/controls/scheduler/appointments-and-dialogs/adding-a-custom-field-to-the-editappointment-dialog
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.