SolutionStream
Top achievements
Rank 1
SolutionStream
asked on 19 May 2009, 09:57 PM
Is there a way to prevent a postback if we are using OnClientAppointmentInserting to present our own custom appointment inserting form?
3 Answers, 1 is accepted
0
Hello Kier,
Yes, you can stop the postback by canceling the event:
function aptInserting(s, e)
{
e.set_cancel(true);
// ...
}
I've noticed the the API reference for this event is missing. Sorry for the inconvenience. We'll take care to update it.
Greetings,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Yes, you can stop the postback by canceling the event:
function aptInserting(s, e)
{
e.set_cancel(true);
// ...
}
I've noticed the the API reference for this event is missing. Sorry for the inconvenience. We'll take care to update it.
Greetings,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
SolutionStream
Top achievements
Rank 1
answered on 21 May 2009, 04:24 PM
Looking at my code again, my postback was occurring because I was calling a window.parent.location.reload(). So, I removed that line and implemented an ajax call to rebind the scheduler.
| function refreshScheduler() |
| { |
| var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); |
| ajaxManager.ajaxRequest('RebindScheduler'); |
| } |
While this works, it always resets my scheduler back to today's date on the default view.
What I would really like to do is somehow call my service updateAppointment call and pass it the newly updated appointment. Can this be achieved in JavaScript? If not, can I fix my SelectedDate problem?
You guys have been incredibly helpful, A++ for support!
0
Hi Kier,
You can directly call the updateAppointment method of RadScheduler:
// ...
var apt = args.get_appointment();
apt.set_subject("New subject");
scheduler.updateAppointment(apt);
This will call the web service to submit the changes and then it'll refresh the data automatically.
Regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can directly call the updateAppointment method of RadScheduler:
// ...
var apt = args.get_appointment();
apt.set_subject("New subject");
scheduler.updateAppointment(apt);
This will call the web service to submit the changes and then it'll refresh the data automatically.
Regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.