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

Context Menus Help

5 Answers 63 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
brian
Top achievements
Rank 1
brian asked on 24 Aug 2010, 04:23 PM
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

5 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 26 Aug 2010, 01:53 PM
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
0
brian
Top achievements
Rank 1
answered on 30 Aug 2010, 07:45 PM
Is it a way to get the "New Appointment" Slot Time? Thanks
0
Veronica
Telerik team
answered on 01 Sep 2010, 02:36 PM
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
0
brian
Top achievements
Rank 1
answered on 01 Sep 2010, 03:59 PM
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.
0
Veronica
Telerik team
answered on 03 Sep 2010, 01:11 PM
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
Tags
Scheduler
Asked by
brian
Top achievements
Rank 1
Answers by
Veronica
Telerik team
brian
Top achievements
Rank 1
Share this question
or