EditRecurrenceDialog

9 posts, 1 answers
  1. Arve Asheim
    Arve Asheim avatar
    8 posts
    Member since:
    Jun 2009

    Posted 12 Sep 2009 Link to this post

    I'm supplying a translation to the radscheduler, but some of the translations need more space, especially on the editrecurrancedialog.
    I already have provided a custom appointment that inherits from Telerik.WinControls.UI.Appointment successfully and provided a custom editappointmentdialog that inherits from Telerik.WinControls.UI.Scheduler.Dialogs.EditAppointmentDialog for editing.
    How can i do the same for editrecurrencedialog?

    I found I can inherit a form the same way as with the editappointmentdialog, but which event/property do I need to override/set to load my new editrecurrencedialog?

    On a side note, I also would like to know what procedure you recomment to utilize the possibility for more than one resource. I.e. add a "More..." button behind the resource combo with it's own form? How would this affect the cmbResource when more than one resource is selected?

    Using Winforms Q2 2009, VS2008
  2. Matthew Green
    Matthew Green avatar
    27 posts
    Member since:
    Aug 2009

    Posted 14 Sep 2009 Link to this post

    To replace the default Recurrence Dialog:

    1. Open you edited Appointment Dialog
    2. Overide the following function:
    public void ShowRecurrenceDialog() 
            { 
                //Dialog automatically adjusts the Recurrence rule of the Current Entity
                using (var recurrenceDialog = new Forms.Scheduling.AppointmentRecurrence(this.CurrentAppointmentEntity)) 
                { 
                    recurrenceDialog.ShowDialog(); 
                } 
            } 

    The above Forms.Scheduling.AppointmentRecurrence is inheriting the default EditAppointmentRecurrence. Feed the appointment into the constructor and the dialog will do the rest for you. 

    For the second note about selecting more than one resource I cant help too much. Its to my knowledge grouping resources will be implemented in a later date. So i would recommend managing this yourself, hiding the current resource controls and adding an extra dialog / control to manage it how you would like. As I havnt needed this part yet i can only put this as a suggestion and hope someone else has a good solution to it.

    Hope this is some help,
    Matthew
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Arve Asheim
    Arve Asheim avatar
    8 posts
    Member since:
    Jun 2009

    Posted 15 Sep 2009 Link to this post

    It's a good way there atleast, hope there will be a solution for more resources soon :-)
  5. Answer
    Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 16 Sep 2009 Link to this post

    Hi Arve Asheim,

    You can override ShowRecurrenceDialog method if you want to change the behavior associated with showing the recurrence dialog (like cloning the appointment object and then setting the properties back to the appointment edit dialog if the user pressed OK).

    If you want to just change the recurrence dialog you can override CreateRecurrenceDialog method which in its default implementation looks like this:

    protected virtual IEditRecurrenceDialog CreateRecurrenceDialog(IEvent recurringAppointment) 
            { 
                EditRecurrenceDialog editRecurrenceDialog = new EditRecurrenceDialog(recurringAppointment); 
                return editRecurrenceDialog; 
            } 

    A new UI will be needed in order to be able to select more than one resource. A combo box with check box items could be used for that purpose. Or as Matthew suggested - another form.

    All the best,
    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.
  6. revox
    revox avatar
    26 posts
    Member since:
    May 2010

    Posted 08 Sep 2010 Link to this post

    I have overridden the EditRecurrenceDialog, and want the start and end datetimes entered there to be communicated back to the EditAppointmentDialog when I click the OK button. I know that the EditRecurrenceDialog constructors take an Appointment argument, but there is no obvious connection back to the EditAppointmentDialog. I find that the datetimes I enter in my custom EditRecurrenceDialog are not reflected in the EditAppointmentDialog. Somebody has been down this path. Help would be welcome. Thanks!
  7. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 14 Sep 2010 Link to this post

    Hi revox,

    Thank you for writing.

    You could customize also the EditAppointmentDialog and override its ShowRecurrenceDialog method. In this method you can take the date from the your custom EditRecurrenceDialog.
    class CustomEditAppoinentDialog: EditAppointmentDialog
    {
        IEditRecurrenceDialog recurrenceDlg;
        public override void ShowRecurrenceDialog()
        {
            base.ShowRecurrenceDialog();
     
            //do your changes here
            //cast recurrenceDlg to your custom type and take its fields
        }
        protected override IEditRecurrenceDialog CreateRecurrenceDialog(IEvent recurringAppointment)
        {
            this.recurrenceDlg = base.CreateRecurrenceDialog(recurringAppointment);
            return this.recurrenceDlg;
        }
    }

    I hope that this will help you. For other questions, feel free to write back.

    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
  8. revox
    revox avatar
    26 posts
    Member since:
    May 2010

    Posted 14 Sep 2010 Link to this post

    Thanks! I've experimented with overriding these methods but simply need to revisit the topic and get it right. Your confirmation helps a lot.
  9. revox
    revox avatar
    26 posts
    Member since:
    May 2010

    Posted 17 Sep 2010 Link to this post

    I got back to this and found your suggestions very helpful. In ShowRecurrenceDialog, I load data from the custom recurrence dialog to the custom appointment dialog. Works great!
  10. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 20 Sep 2010 Link to this post

    Hello revox,

    Thank you for writing me back. I am glad to hear that you solved the issue. Should you have further questions, feel free to contact me.

    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready