Context Menus Help

6 posts, 0 answers
  1. brian
    brian avatar
    21 posts
    Member since:
    Aug 2010

    Posted 24 Aug 2010 Link to this post

    When right click mouse, it is possible to actually add an appointment to the calendar.   Knowing that we do not want the user to be able to add an actual appointment to the calendar,  we would like to  change it where it allows you to click the calendar day and time with your mouse- and it launched the “add new”  screen, actually we would like "New Appointment" link to another page, when user click this "Add New Appointment", it will directly to another page. Is it possible to do it? Also we would like only show "New Appointment" and disable the rest of 3 choices when right click mouse on the calendar.

    Thanks
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 26 Aug 2010 Link to this post

    Hello brian,

    Yes, you can customize the ContextMenus of the RadScheduler. You can refer to the following help topics to achieve this:

    Time slot context menu

    Appointment context menu

    As I understand you want to redirect to another page when "New Appointment"  is clicked in the time slot and disable the other three options. Here's the code for this:
     
    <telerik:RadScheduler ID="RadScheduler1" runat="server">
            <TimeSlotContextMenus>
                <telerik:RadSchedulerContextMenu ID="SchedulerTimeSlotContextMenu" runat="server">
                    <Items>
                        <telerik:RadMenuItem Text="New Appointment" ImageUrl="Images/new.gif"
                            NavigateUrl="http://www.telerik.com" />
                    </Items>
                </telerik:RadSchedulerContextMenu>
            </TimeSlotContextMenus>
        </telerik:RadScheduler>

    Find the full code in the attached .zip file.

    Hope this helps.

    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
  3. brian
    brian avatar
    21 posts
    Member since:
    Aug 2010

    Posted 30 Aug 2010 Link to this post

    Is it a way to get the "New Appointment" Slot Time? Thanks
  4. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 01 Sep 2010 Link to this post

    Hello brian,

    The result from the code in my previous post is the same as required from you. Only "New Appointment" ContextMenuItem will appear when right-clicking the Time Slot. Please take a look at the picture below:



    When you click on the ContextMenuItem - a new page is opened. You can replace the Url in my example with your own.

    Please let me know if you have more questions.

    Cheers,
    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
  5. brian
    brian avatar
    21 posts
    Member since:
    Aug 2010

    Posted 01 Sep 2010 Link to this post

    Sorry I misleading the question, I can open another page by following your example, now my question is, when I right click at 7pm, how
    do I catch this "7pm" time and populate to next page?

    Another question is we are ready to buy this package, how do we put the license number into our files? Put on web.config file?

    Thanks.
  6. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 03 Sep 2010 Link to this post

    Hello brian,

    You can subscribe to the OnClientTimeSlotContextMenuItemClicked and use the following code:

    function timeSlotContextMenuItemClicked(sender, args) {
                var slot = args.get_slot();
                alert(slot.get_startTime());
            }

    Hope this helps.

    As for the other question, you don't need any license number to use the dev version. It will work just fine and no extra effort is required from  your side.

    All the best,
    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
Back to Top