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

Changes Snooze times

4 Answers 51 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 12 Jun 2012, 08:10 AM
Hallo,

i will change the snooze times for reminder. I didn't need snooze time 5, 10 and 15 minutes befor start event, because i have only all times events without time.

Regards,
Christian

4 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 13 Jun 2012, 02:11 PM
Hi Christian,

To achieve the desired scenario you could take advantage of the FormCreated server event. In its event handler you will be able to find the RadComboBox representing the Reminder and remove the items that you don't need. Here is an example:
<telerik:RadScheduler runat="server" ID="RadScheduler1" OnFormCreated="RadScheduler1_FormCreated" Reminders-Enabled="true"/>
protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
{
    if ((e.Container.Mode == SchedulerFormMode.AdvancedEdit) || (e.Container.Mode == SchedulerFormMode.AdvancedInsert))
    {
        RadComboBox reminder = e.Container.FindControl("Reminder") as RadComboBox;
        if (reminder != null)
        {
            reminder.FindItemByText("5 minutes").Remove();
            reminder.FindItemByText("10 minutes").Remove();
            reminder.FindItemByText("15 minutes").Remove();
        }
    }
}

For more information how to access the controls inside the advanced form of RadScheduler you could refer to the following help article: http://www.telerik.com/help/aspnet-ajax/scheduler-customizing-advanced-form-formcreated.html.

I hope this will help.

Kind regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Frank
Top achievements
Rank 1
answered on 14 Jun 2012, 07:30 AM
Hi Ivana,

i don't mean the AdvancedForm, i mean the Reminder Form. I have attach a Screenshot with marks the
not needed items. Regards  Christian
0
Accepted
Ivana
Telerik team
answered on 15 Jun 2012, 06:47 PM
Hi Christian,

Thanks for clarifying the exact scenario.

In this case you can take advantage of the client API of the control. You can subscribe to the OnClientReminderTriggering event and do the following:
function OnClientReminderTriggering(sender, args) {
    var combo = $find(sender.get_id() + "_ReminderDialog_SnoozeTime");
    combo.set_text("make a selection");
    for (var i = 0; i < 3; i++) {
        combo.get_items().removeAt(0);
    }
}
<telerik:RadScheduler runat="server" ID="RadScheduler1"
    Reminders-Enabled="true"
    OnClientReminderTriggering="OnClientReminderTriggering" />

I hope this will help.

Kind regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Frank
Top achievements
Rank 1
answered on 18 Jun 2012, 02:39 PM
Hi Ivana,

thank you, this resolve my problem.
I have edit you JavaScript Code, now was selected the first item.

function OnClientReminderTriggering(sender, args)
    {
        var combo = $find(sender.get_id() + "_ReminderDialog_SnoozeTime");
        for (var i = 0; i < 3; i++)
        {
            combo.get_items().removeAt(0);
        }
        var firstItem = combo.get_items().getItem(0);
        if (firstItem)
        {
            firstItem.select();
        }
    }

Regards,
Christian 

Tags
Scheduler
Asked by
Frank
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Frank
Top achievements
Rank 1
Share this question
or