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

Howto Prevent RadScheduler Advanced Forms for closing

1 Answer 207 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Enigma
Top achievements
Rank 1
Enigma asked on 23 Apr 2010, 02:47 AM
Hi,

I am doing some R&D work for a client of mine who use currently using a scheduling control called DayPilot.  They are not satisfied with the existing controls display and hence the R&D.

To meet their unique business requirements and use their existing DB schema, I have used Advanced Edit Form.  On the code behind I intercept the AdvancedCommand Event Handler to get the details of the users selection and insert them in the DB the way the client wants/needs.  However, if there is an error in the insert, i.e. the appointment is not complying with their internal business logic, I retrieve the error label control from the advancededitform and set its value to the error but I can't seem to find a way to stop the window (popup) from closing.  So the user never sees the error.  There is no e.Cancel option.  I tried putting a class CancelInsertEdit property and set that to true and then intercepted the AppointmentInsert handler in which I checked the class CancelInsertEdit and set e.Cancel there but the window still closes.

The other option would be to run the custom insert logic in AppointmentInsert handler, but I can't seem to retrieve the controls on the AdvancedEditTemplate in that event handler.

Any advice would be much appreciated.

Regards,
Mans.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Apr 2010, 11:37 AM
Hi Mans,

Have you considered using custom validators in the advanced form? I suggest you review the custom advanced form templates kb article and see how we use validators for the subject and start/end DateTime Pickers:

http://www.telerik.com/support/kb/aspnet-ajax/scheduler/sample-project-of-the-customizing-the-advanced-template-example.aspx



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