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

Export functionality now working in Appointment context menu.

2 Answers 44 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Manmeet
Top achievements
Rank 1
Manmeet asked on 16 Aug 2010, 03:34 PM
Hi telerik team

I am very pleased with your constant support over my problems but i m stuck with new problem.

I need to add "Export to iCal" link in Appointment context menu.
like:
<appointmentcontextmenus>
      <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
           <Items>
                <telerik:RadMenuItem Text="Edit" Value="CommandEdit" />
                <telerik:RadMenuItem IsSeparator="True" />
                <telerik:RadMenuItem Text="Export" Value="Export" />
           </Items>
       </telerik:RadSchedulerContextMenu>
</appointmentcontextmenus>

but on "AppointmentContextMenuItemClicking" event is not working as required. In debugging mode it never comes to this event. incase of "CommandEdit" it automatically opens the Edit form (i.e. Advanced Edit template).

protected void RadScheduler1_AppointmentContextMenuItemClicking(object sender, AppointmentContextMenuItemClickingEventArgs e)
        {
            if (e.MenuItem.Text.Contains("Export"))
            {
                WriteCalendar(RadScheduler.ExportToICalendar(e.Appointment));
                e.Cancel = true;
            }
        }

Is there any way to call "WriteCalendar(String data)" method through appointment context menu?
please help me to solve this problem.

Regards
Manmeet Singh

2 Answers, 1 is accepted

Sort by
0
Manmeet
Top achievements
Rank 1
answered on 17 Aug 2010, 04:30 AM
Hi telerik team

please help in this coz i need it very urgent.

Regards
Manmeet Singh
0
Accepted
Peter
Telerik team
answered on 18 Aug 2010, 04:40 PM
Hello Manmeet,

Your code looks correct. If you use RadAjaxManager or any update panel, please note that the export functionality needs a real postback. In this case you should use this help topic -  Exclude controls from ajaxifying. Specifically, I recommend the second approach:

2) Disable AJAX for the current request

Use OnRequestStart client-side event handler to determine the AJAX initiator and disable AJAX for the current request. The event is fired on each request so on the next one the same check will be performed. A similar implementation is often used in case of exporting from AJAXified Grid:

Export RadGrid content to Excel/Word/CSV/PDF with Ajax enabled



Greetings,
Peter
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
Manmeet
Top achievements
Rank 1
Answers by
Manmeet
Top achievements
Rank 1
Peter
Telerik team
Share this question
or