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

Advanced Form problems

1 Answer 82 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
towpse
Top achievements
Rank 2
towpse asked on 06 Jan 2010, 12:04 AM
I'm wondering if anyone can shed a little light on some issues i' m having with using an AdvancedForm control as the insert and edit templates in conjunction with AdvancedForm.js

I'm comparing the behaviour with my app and the demos online.

The problem I'm seeing is with regards to whether or not i'm editing the master or child occurrence.

In the telerik demos
  • when i edit a series on any appointment the appointment state is 1 Master, recurrecne rule intact, no parent Id, ID is int
  • when i edit only an occurrence the state is 3 Exception, no rule, parent Id is original int ID, Id is originalInt_#

Should the appointment type when editing for a single occurrence be an Exception before the exception appointment has been created?

In my app right now:
  • when i edit a series on only the first appointment: state is 1 (Master), recurrence rule intact, no parent Id, ID is Guid (seems fine)
  • when i edit series on a child occurrence: state is 2 (Occurrence), no recurrence rule, parent Id is parent Guid_IndexInt
  • when i edit the single occurrence on a child again state is 2 (Occurrence), no recurrence rule, parent Id is parent Guid_IndexInt 

The recurrence form is not populated properly when editing a series of a child occurrence.
Although my app is not working proeprly it seems correct for a child occurrecne to be type 2 when editing a single occurrecne to create a tyep 3 exception...

Why is there a difference from what i see in my app and the online demos?
I am using the AdvancedForm.ascx control and the AdvancedForm.js and the code is the same from what you show online since I got it from telerik site.

What is the meaning of a recurrecen Starte 2?

Which flow of events that i present is correct?
I would think the demos are correct?


Please help.

1 Answer, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 08 Jan 2010, 02:33 PM
Hello,

Which event are you handling?

For example, in the Advanced Template demo there are few things that could happen if you handle the AppointmentUpdate event:

- If you edit the series, the Appointment passed through the event arguments is always the Master. This is because the 'base' data of the series is stored in the Master's RecurrenceRule.

- If you edit a single occurrence, first an AppointmentUpdate event will be fired for the Master because the RecurrenceRule needs to be updated with an exception for this occurrence. Next, an AppointmentInsert will be fired for the new 'customized' Appointment with RecurrenceState = Exception (unless you are deleting an occurrence).

- Subsequent edits of the 'customized' Appointment will fire AppointmentUpdate for it, as the Master already has the exception added to the RecurrenceRule

This is pretty much what you observe in our demos and I am not sure what's different in your scenario. The RecurrenceState 2 is just a regular 'Occurrence' of the recurrent series that has not been modified. Such Appointments shouldn't be passed to the AppointmentUpdate event because they don't "exist" in the data source - they are created on-the-fly from the Master's RecurrenceRule.

I hope this makes things a bit more clear.

Kind regards,
Dimitar Milushev
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
towpse
Top achievements
Rank 2
Answers by
Dimitar Milushev
Telerik team
Share this question
or