Generate VLARM in code behind.?

4 posts, 0 answers
  1. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 01 Apr Link to this post

    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








  2. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 06 Apr Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 06 Apr in reply to Plamen Link to this post

    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.

     

     

  5. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 11 Apr Link to this post

    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.
Back to Top