RadCalendar with ContexMenu

Thread is closed for posting
3 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 19 Feb 2007 Link to this post

    Requirements

    RadCalendar
    RadMenu

    v2.0.x
    v4.0.x
    Web.UI version 2007.3.1425
    .NET version

    2.0
    Visual Studio version

    2005
    programming language

    JavaScript
    browser support

    all browsers supported by RadControls

    To convert code   Telerik online converter

     
    PROJECT DESCRIPTION
    The project demonstrates how a RadMenu instance can be used as a context menu to a RadCalendar. On load of the page window a contextmenu event handler is attached to the RadCalendar. When a date cell is clicked the context menu with two items ("Log Date" and "No Action") is shown and the clicked cell date is saved in a javascript object (named contextDate). When the first item is chosen, the clicked cell date is published to the page from the contextDate object value.

  2. E9155D41-57F3-48DF-AC3E-78ED4FBEBFAA
    E9155D41-57F3-48DF-AC3E-78ED4FBEBFAA avatar
    7 posts
    Member since:
    Sep 2005

    Posted 13 Jun 2007 Link to this post

    Great demo.
  3. 3BD6F94B-4C03-46D3-8568-9982F1F201BF
    3BD6F94B-4C03-46D3-8568-9982F1F201BF avatar
    10940 posts
    Member since:
    May 2014

    Posted 08 Mar 2008 Link to this post

    Hi guys,

    We've attached Web.UI version of the project to this thread. The main difference is the new way of attaching handlers based on the MS AJAX library. If before we used to make checks for both Firefox and IE, now we can use a single line that is crossbrowser compatible:

    before:

    if (window.addEventListener) 
          { 
           document.getElementById("RadCalendar1").addEventListener("contextmenu", ShowContextMenu, false); 
          } 
    else 
          { 
           document.getElementById("RadCalendar1").attachEvent("oncontextmenu", ShowContextMenu); 
          } 

    after:

    $addHandler($get("RadCalendar1"), "contextmenu", ShowContextMenu); 

    Greetings,
    Steve
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.