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

Problems with insert and update events

1 Answer 46 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Joakim
Top achievements
Rank 1
Joakim asked on 22 Sep 2010, 08:30 AM
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 :)

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 27 Sep 2010, 12:45 PM
Hello Joakim,

I recommend you use the approach from the Bind to List demo and handle AppointmentInsert/Update/Delete to update the appointments' list.


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