This is a migrated thread and some comments may be shown as answers.

RecurrenceEditor Reset on PostBack

3 Answers 70 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kerry
Top achievements
Rank 1
Kerry asked on 27 Jun 2014, 06:58 PM

I have some oddities in the RecurrenceEditor retaining it's selected values.

The editor is part of a templated edit form. On that form, there is a control that causes postback. There are a couple instances in which certain items on the RecurrenceEditor are reset on postback.

In my examples, () denote items the user selects. If it remains in the second part of my scenario, the selected item stays selected. Otherwise, I will state to what it resets.

Yearly - Every (Month)(Day), resets to Every January 1
Monthly - Day (Day) of every (#) Months, resets to Day 1 of every (#) Months

In all other scenarios, the selected items remain correctly selected.

Thanks,
Kerry Wano

 

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 01 Jul 2014, 12:09 PM
Hello Kerry,

The scenario looks quite custom and it is not quite clear how to replicate it at our side. Would you please provide a little bit more information that will help us observe it at our side so we could inspect it and be more helpful?

Regards,
Plamen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Kerry
Top achievements
Rank 1
answered on 02 Jul 2014, 03:54 PM
I'll simplify the example, but I have a RecurrenceEditor and another control within an UpdatePanel.

<EditFormSettings EditFormType="Template">
    <FormTemplate>
        <asp:UpdatePanel ID="pnlEditForm" runat="server">
            <ContentTemplate>
                <telerik:RadSchedulerRecurrenceEditor ID="schFrequency" runat="server" Width="600px" />
                <br />
                <uc:DropDownList ID="ddlTaskType" runat="server" AutoPostBack="true" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </FormTemplate>
</EditFormSettings>

I've stripped out a lot of other controls within the UpdatePanel, but the DropDownList causes changes in some of those other controls on postback. 

The issue arises based upon what I have selected in the RecurrenceEditor. First, if I have Yearly selected and I select Every July 10, on postback, the selections reset to Yearly, Every January 1. The month and day reset to defaults. Second, if I have Monthly selected and Day 10 of every 2 Months, the selections reset to Monthly, Day 1 of every 2 Months. The day resets to default. Does that make sense?
0
Accepted
Plamen
Telerik team
answered on 07 Jul 2014, 01:44 PM
Hello Kerry,

Thank you for elaborating the issue. 

You can persist the rule in the Editor by using the code below:
protected void ddlTaskType_SelectedIndexChanged(object sender, DropDownListEventArgs e)
  {
      schFrequency.RecurrenceRule = schFrequency.RecurrenceRule;
  }
<telerik:RadDropDownList ID="ddlTaskType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlTaskType_SelectedIndexChanged" >
                    <Items>
                         <telerik:DropDownListItem Text="first" />
                         <telerik:DropDownListItem Text="second" />
                         <telerik:DropDownListItem Text="third" />
                         <telerik:DropDownListItem Text="forth" />
 
                    </Items>
                </telerik:RadDropDownList>

The unusual behavior is most probably connected with the fact the RecurrenceEditor is mostly used in RadScheduler and is sometimes deliberately reset to initial settings.

Hope this will help you solve the issue.

Regards,
Plamen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Scheduler
Asked by
Kerry
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Kerry
Top achievements
Rank 1
Share this question
or