Set default RecurrenceRangeType

5 posts, 0 answers
  1. Jose
    Jose avatar
    3 posts
    Member since:
    Jan 2015

    Posted 17 May Link to this post

    Hello,

    I have overriden  the EditRecurrenceTemplate in order to force that every appointment with recurrence must have a RecursUntil Date.

    What I have done, in the RangeGroup, is removing the radiobuttons that I won't use:

    "NoEndDate"

    "EndAfter"

    So I only have the "EndBy" radiobutton

    If I'm editing a recurrence and I check (manually) the radiobutton, everything works fine. Exactly what I want is to extract :

    Appointment.RecurrenceRule.Pattern.RecursUntil

    but I don't want to check the radiobutton everytime, so I have tried changing the radiobutton for a label or setting the radiobutton IsChecked property to True, but with both options, I get:

    Appointment.RecurrenceRule.Pattern.RecursUntil= null

    How can i check that button programmatically?

    Or maybe made it set but setting the Appointment.RecurrenceRule.Pattern.RecursUntil to the value?



    Thanks in advance

    Hello,

    I have overriden  the EditRecurrenceTemplate in order to force that every appointment with recurrence must have a RecursUntil Date.

    What I have done, in the RangeGroup, is removing the radiobuttons, so I won't use:

    "NoEndDate"

    "EndAfter"

     

    So I only have the "EndBy" radiobutton

     

    If I'm editing a recurrence and I check (manually) the radiobutton, everything works fine. Exactly what I want is to extract :

    Appointment.RecurrenceRule.Pattern.RecursUntil

    but I don't want to check the radiobutton everytime, so I have tried changing the radiobutton for a label or setting the radiobutton IsChecked property to True, but with both options, I get:

    Appointment.RecurrenceRule.Pattern.RecursUntil= null

     

    How can i check that button programmatically?

    Or maybe made it set but setting the Appointment.RecurrenceRule.Pattern.RecursUntil to the value?

     

    Thanks in advance

     

     

     

     

  2. Kalin
    Admin
    Kalin avatar
    1279 posts

    Posted 22 May Link to this post

    Hello Jose,

    Indeed, if you set RecursUntil property of the RecurrencePattern the RadioButton should appear selected when the dialog is opened. Can you please give it a try and let us know if it work as expected?

    Hope this will work for you.

    Regards,
    Kalin
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Jose
    Jose avatar
    3 posts
    Member since:
    Jan 2015

    Posted 22 May in reply to Kalin Link to this post

    Hello,

    The problem that I have found is that I don't want to set the RecursUntil property of every appointment, just them that have recurrence. How can I catch the event that occurs when edit recurrence dialog is opened?

     

    Thanks 

  4. Kalin
    Admin
    Kalin avatar
    1279 posts

    Posted 24 May Link to this post

    Hi Jose,

    RadScheduleView fires the ShowDialog event whenever any dialog is being opened. Afterwards by checking the DialogViewModel property from the event arguments you could find out which dialog exactly is currently open. Using this approach you would be able to set the initial value of the RecurrenceRangeType as shown below:

    private void scheduleView_ShowDialog(object sender, ShowDialogEventArgs e)
    {
        var dialogViewModel = e.DialogViewModel as RecurrenceDialogViewModel;
        if (dialogViewModel != null)
        {
            dialogViewModel.RecurrenceRangeType = RecurrenceRangeType.RepeatUntil;
        }
    }


    This should allow to achieve the desired scenario. If you have any other questions please let us know.

    Regards,
    Kalin
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  5. Jose
    Jose avatar
    3 posts
    Member since:
    Jan 2015

    Posted 24 May in reply to Kalin Link to this post

    That worked great!

    Thanks!

Back to Top