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

Scheduler :: Export recurring appointment

1 Answer 107 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mayur Shah
Top achievements
Rank 1
Mayur Shah asked on 07 Sep 2009, 11:33 AM
Hi,

I have faced a problem when I click on "Export to Outlook" button for a recurring appointment, which is set to recurr yearly on a specific date.
It says "Appointment.ics is not  a valid Internet Calendar file".

I tried creating a  yearly recurring appointment at
http://demos.telerik.com/aspnet-ajax/scheduler/examples/export/defaultcs.aspx
and received the same above mentioned error.

I use Outlook 2007 as the mail client.

The code used is:

#region

 

RadScheduler AppointmentCommand Event

 

 

protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)

 

{

 

if (e.CommandName == "Export")

 

{

 

//RadAjaxManager1.RaisePostBackEvent(e.ToString());

 

 

TimeSpan currentOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);

 

 

//string iCal = RadScheduler.Export(apt, currentOffset);

 

WriteCalendar(

RadScheduler.ExportToICalendar(e.Container.Appointment, currentOffset));

 

}

}

#endregion



#region

 

WriteCalendar (for export to outlook)

 

 

public void WriteCalendar(string data)

 

{

 

HttpResponse response = Page.Response;

 

response.Clear();

response.Buffer =

true;

 

response.ContentType =

"text/calendar";

 

response.ContentEncoding =

Encoding.UTF8;

 

response.Charset =

"utf-8";

 

response.AddHeader(

"Content-Disposition", "attachment;filename=\"Appointment.ics\"");

 

response.Write(data);

response.End();

}

#endregion



Please let us know if we are missing anything.

Any help urgently will be highly appreciated.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 08 Sep 2009, 11:24 AM
Hi Rikin,

Thank you for reporting this issue. We verified that this is indeed a bug with RadScheduler and we will do our best to resolve it shortly.


Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Scheduler
Asked by
Mayur Shah
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or