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

Generate VLARM in code behind.?

3 Answers 65 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 01 Apr 2016, 09:36 AM

I am using entity frame work to pull my appointments in but I need to be able to set reminders on the appointments i have added the filed DataReminderField but obv i need to be able to set the remidner at the apointment creation side I am doing this through a custom booking form and its been requested I mimic the outlook reminder dialog which your component offers. So my main question is how do i write the valarm code through entity framework ?.

 

So the string i need to generate is this one

 

   BEGIN:VALARM
    TRIGGER:-PT2880M
    ACTION:DISPLAY
    DESCRIPTION:Reminder
    END:VALARM








3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 06 Apr 2016, 07:28 AM
Hello,

Thank you for getting in touch with us.

You can use the Telerik.Web.UI.Reminder object and its toString method and assign its Trigger property as for example in the code below:
Reminder newreminder = new Reminder();
       newreminder.Trigger = TimeSpan.FromMinutes(1);
       newreminder.Attributes["DESCRIPTION"] = "DISPLAY";
       newreminder.Attributes["ACTION"] = "Reminder";
  
       Response.Write(newreminder.ToString());


Yet I would like to explain that the attributes are not directly rendered but in a Telerik specific way. Here is the string generated from the above code:
BEGIN:VALARM TRIGGER:-PT1M X-TELERIK-ATTRIBUTE;NAME=DESCRIPTION;VALUE=DISPLAY X-TELERIK-ATTRIBUTE;NAME=ACTION;VALUE=Reminder X-TELERIK-UID: END:VALARM


Unfortunately the Reminder object does not support a way to directly parse the attributes as in your requirement. One possible solution is to extend our Reminder class and override its toString method according to your custom requirements.

Regards,
Plamen
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Philip
Top achievements
Rank 1
answered on 06 Apr 2016, 07:31 AM

That is fantastic also any way of disabling the open item portion of the reminder dialog at all ?. As I am inserting apointments in custom way dont want that ability. Also how do i send the update back for the snoze fucntion and dismiss via code.

 

The final piece of my puzzle is ocurrance from the code behind then my project will be complete I must say the level of support I get off here is fantastic.

 

 

0
Plamen
Telerik team
answered on 11 Apr 2016, 06:43 AM
Hi,

One simple way to avoid the usage of the open item  button is to hide it with CSS as for example it is done in the code below:
.rsRemOpenItemBtn {
     display:none;
     }

As for the snooze and dismiss functions - there are not such public methods available in the control but you can using these private ones where the reminders is either one reminder or an array of reminders:
  scheduler._snoozeReminders(reminders, minutes);
  scheduler._dismissReminders(reminders);


Regards,
Plamen
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Scheduler
Asked by
Philip
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Philip
Top achievements
Rank 1
Share this question
or