Hi,
In my asp.net page i have a radscheduler that i binds to a object list like this:
RadSchedularCalendar.DataSource = woListFiltered;
RadSchedularCalendar.DataBind();
then I need to add an another type of objects to the calendar, so I do it like this:
foreach (CustomAppointment c in ourCATs)
{
//calculate the timespan
TimeSpan dur=c.ToTime-c.FromTime;
Appointment nCatApp=new Appointment();
nCatApp.AllowDelete=true;
nCatApp.AllowEdit=true;
nCatApp.DataItem=c;
nCatApp.Description=c.Comment;
nCatApp.End=c.ToTime;
nCatApp.Start=c.FromTime;
nCatApp.Subject=c.TradesmanName+": "+c.TypeName;
nCatApp.Visible=true;
nCatApp.CssClass = "rsCategoryRed";
RadSchedularCalendar.InsertAppointment(nCatApp);
}
the problem is that, when editing / deleteing appointments bounded to the radscheduler (RadSchedularCalendar.DataSource = woListFiltered;), the AppointmentUpdate and AppointmentDelete is triggered as normal, but when editing / deleting appointments added by the foreach loop those event won't trigger.
An another problem that I have is that I need to open the default advanced edit form or a advanced edit form defined in an themplate when double clicking on an appointment added with the DataSource method, and run some code behind when the user double clicks on an appointment added with the foreach method.
Any help is highly appriciated :)
In my asp.net page i have a radscheduler that i binds to a object list like this:
RadSchedularCalendar.DataSource = woListFiltered;
RadSchedularCalendar.DataBind();
then I need to add an another type of objects to the calendar, so I do it like this:
foreach (CustomAppointment c in ourCATs)
{
//calculate the timespan
TimeSpan dur=c.ToTime-c.FromTime;
Appointment nCatApp=new Appointment();
nCatApp.AllowDelete=true;
nCatApp.AllowEdit=true;
nCatApp.DataItem=c;
nCatApp.Description=c.Comment;
nCatApp.End=c.ToTime;
nCatApp.Start=c.FromTime;
nCatApp.Subject=c.TradesmanName+": "+c.TypeName;
nCatApp.Visible=true;
nCatApp.CssClass = "rsCategoryRed";
RadSchedularCalendar.InsertAppointment(nCatApp);
}
the problem is that, when editing / deleteing appointments bounded to the radscheduler (RadSchedularCalendar.DataSource = woListFiltered;), the AppointmentUpdate and AppointmentDelete is triggered as normal, but when editing / deleting appointments added by the foreach loop those event won't trigger.
An another problem that I have is that I need to open the default advanced edit form or a advanced edit form defined in an themplate when double clicking on an appointment added with the DataSource method, and run some code behind when the user double clicks on an appointment added with the foreach method.
Any help is highly appriciated :)