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

InLine Editing: How Does It Work?

1 Answer 96 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 17 Nov 2011, 10:43 AM
Hi All,

Can someone give me a more detailed description of how InLine Editing works; i.e. what is the event sequence and what should be raised when?

We have a problem where we are no longer able to do inline editing or drag-copy/resize in our ScheduleView control. Actually over the course of two months, inline editing in our solution has degraded from working always to saving only the first character to not working at all.

First let me say that the RadScheduleView's Inline Editing works flawlessly in a sample project, so I realise that the problem is somewhere in our solution; however I need help in troubleshooting to find the source of the problem.

I am using v 2011.2.1107.1040 of the Telerik.Windows.Controls.ScheduleView.dll assembly, and I have not specified any InlineEditingTemplate. Currently I open the ScheduleView and attempt to enter an appointment by typing "asdf"; After putting breakpoints in the relevant event handlers, I see the following events are raised, one after another:

AppointmentCreating; appt has null Subject field
AppointmentSaving' appt has Subject=="a" -- not "asdf"
AppointmentCreated
AppointmentDeleting
AppointmentDeleted

The inline editing takes one character and creates a Appointment with that character, then immediately deletes the newly-created Appointment. Without adding breakpoints, it looks as if inline editing does not work because the appointment is created and deleted before it can appear in the ScheduleView. If I set AppointmentDeletingEventArgs.Cancel = true, typing "abc" results in three new appointments being created.

Please help me understand how this process is supposed to work so that I can determine what in our solution is causing this behaviour. What actions will cause the ScheduleView to delete an appointment? I assume that the default inline editing template uses a TextBox. What causes the TextBox to end the editing and create a new appointment? (Or in our case end editing after one character has been entered.)

Is there any more in-depth documentation on the RadScheduleView features and events? How does validation affect the inline editing states?

Any insights will be greatly appreciated--
Cheers,
Scott

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 22 Nov 2011, 11:12 AM
Hello Scott,

We're sorry for the issues you're experiencing.

I'll explain the sequence of the events when an appointment is created in the inline mode:

When a timeslot is selected and the user starts typing - the timeslot enters the inline mode and the following events are fired:

 - AppointmentCreating
 - AppointmentSaving
 - AppointmentCreated

Note that in the AppointmentSaving event handler the Subject contains only the first letter, as the event is fired as soon as the user starts typing.

When the user finishes typing and the textbox loses the focus, AppointmentSaving event is fired again and this time the Subject is set correctly.

I cannot tell why AppointmentDeleting and AppointmentDeleted events are fired in your case as in general they're not supposed to fire.

Hope this helps. You can check the documentation about RadScheduleView events here and features here

If you have any additional questions, write to us again.

Best wishes,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
Scott
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or