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

A Scheduler newbie writes ...

1 Answer 49 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 12 Oct 2010, 08:36 AM
I'm working my through the AdvancedTemplate example in the docs (which is quite out of date, BTW) and have tried to add the Description and Reminder fields to the Template.

Adding the Description has worked OK, but I can't make Reminder work. If I add a line like this to my template ...
Reminder='<%# Bind("Reminder") %>'

and run the page it displays OK and double-clicking to open the advanced form works. But if I try and save the appointment I get this JS error.

Sys.WebForms.PageRequestManagerServerErrorException: Item has already been added. Key in dictionary: 'Reminder'  Key being added: 'Reminder'

-- 
Stuart

1 Answer, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 12 Oct 2010, 05:42 PM
Hello Stuart Hemming,

Yes, our documentation for RadScheduler at all is outdated. We'll do the needful to update it.

If you find anything which is mistaken in future - please feel free to share it. We appreciate your help.

You need a few things to make the Reminders working:

1) Allow them in Scheduler via :
<Reminders Enabled="true" />

2) Create a ComboBox or other control in the AdvancedForm.cs to choose the time for the Reminder:

<telerik:RadComboBox runat="server" ID="ReminderDropDown" Width="120px" Skin='<%# Owner.Skin %>'>
                           <Items>
                               <telerik:RadComboBoxItem Text='<%# Owner.Localization.ReminderNone %>' Value="" />
                               <telerik:RadComboBoxItem Text='<%# "0 " + Owner.Localization.ReminderMinutes %>' Value="0" />
                               <telerik:RadComboBoxItem Text='<%# "5 " + Owner.Localization.ReminderMinutes %>' Value="5" />
                               <telerik:RadComboBoxItem Text='<%# "10 " + Owner.Localization.ReminderMinutes %>' Value="10" />
                               <telerik:RadComboBoxItem Text='<%# "15 " + Owner.Localization.ReminderMinutes %>' Value="15" />
                               <telerik:RadComboBoxItem Text='<%# "30 " + Owner.Localization.ReminderMinutes %>' Value="30" />
                               <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderHour %>' Value="60" />
                               <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderHours %>' Value="120" />
                               <telerik:RadComboBoxItem Text='<%# "3 " + Owner.Localization.ReminderHours %>' Value="180" />
                               <telerik:RadComboBoxItem Text='<%# "4 " + Owner.Localization.ReminderHours %>' Value="240" />
                               <telerik:RadComboBoxItem Text='<%# "5 " + Owner.Localization.ReminderHours %>' Value="300" />
                               <telerik:RadComboBoxItem Text='<%# "6 " + Owner.Localization.ReminderHours %>' Value="360" />
                               <telerik:RadComboBoxItem Text='<%# "7 " + Owner.Localization.ReminderHours %>' Value="420" />
                               <telerik:RadComboBoxItem Text='<%# "8 " + Owner.Localization.ReminderHours %>' Value="480" />
                               <telerik:RadComboBoxItem Text='<%# "9 " + Owner.Localization.ReminderHours %>' Value="540" />
                               <telerik:RadComboBoxItem Text='<%# "10 " + Owner.Localization.ReminderHours %>' Value="600" />
                               <telerik:RadComboBoxItem Text='<%# "11 " + Owner.Localization.ReminderHours %>' Value="660" />
                               <telerik:RadComboBoxItem Text='<%# "12 " + Owner.Localization.ReminderHours %>' Value="720" />
                               <telerik:RadComboBoxItem Text='<%# "18 " + Owner.Localization.ReminderHours %>' Value="1080" />
                               <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderDays %>' Value="1440" />
                               <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderDays %>' Value="2880" />
                               <telerik:RadComboBoxItem Text='<%# "3 " + Owner.Localization.ReminderDays %>' Value="4320" />
                               <telerik:RadComboBoxItem Text='<%# "4 " + Owner.Localization.ReminderDays %>' Value="5760" />
                               <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderWeek %>' Value="10080" />
                               <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderWeeks %>' Value="20160" />
                           </Items>
                       </telerik:RadComboBox>

3) Create a property to get and set the value of the combobox in the AdvancedForm code-behind. Make sure you add Bindable attribute to this property:

[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
        public string Reminder
        {
            get
            {
                if (Owner.RemindersSupport && ReminderDropDown.SelectedValue != string.Empty)
                {
                    return ReminderDropDown.SelectedValue;
                }
                  
                return string.Empty;
            }
  
            set
            {
                RadComboBoxItem item = ReminderDropDown.Items.FindItemByValue(value);
                if (item != null)
                {
                    item.Selected = true;
                }
            }
        }

4) Please make sure you are using the latest AdvancedForm.js file. You can find it in this demo.

Please take a look at the steps above and make sure that all is held. If you still have problems could you please send me your project so I can inspect it and help you?

Thank you!

Regards,
Veronica MIlcheva
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
Tags
Scheduler
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Veronica
Telerik team
Share this question
or