Hello Team,
I have a requirement like when the user try to update the appointment by dragging the appointment then it should popup a confirm box and if user clicks on ok then it should update other wise not. its just like the existing delete functionality. could you please let me know how to achieve this.
Thanks,
Ram
I have a requirement like when the user try to update the appointment by dragging the appointment then it should popup a confirm box and if user clicks on ok then it should update other wise not. its just like the existing delete functionality. could you please let me know how to achieve this.
Thanks,
Ram
7 Answers, 1 is accepted
0
Hello,
You can use the AppointmentMoveEnd event to ask the user for confirmation:
function aptMoveEnd(sender, eventArgs)
{
if (!confirm("Confirm move?"))
{
eventArgs.set_cancel(true);
}
}
That is if it wasn't for a bug in RadScheduler that will cause it to abort the drag while the confirmation dialog is still shown. We're working to resolve it, but in the meantime you'll have to use this code:
function aptMoveEnd(sender, eventArgs)
{
sender._dragging = false;
if (!confirm("Confirm move?"))
{
eventArgs.set_cancel(true);
}
sender._dragging = true;
}
I hope this helps.
Best wishes,
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 use the AppointmentMoveEnd event to ask the user for confirmation:
function aptMoveEnd(sender, eventArgs)
{
if (!confirm("Confirm move?"))
{
eventArgs.set_cancel(true);
}
}
That is if it wasn't for a bug in RadScheduler that will cause it to abort the drag while the confirmation dialog is still shown. We're working to resolve it, but in the meantime you'll have to use this code:
function aptMoveEnd(sender, eventArgs)
{
sender._dragging = false;
if (!confirm("Confirm move?"))
{
eventArgs.set_cancel(true);
}
sender._dragging = true;
}
I hope this helps.
Best wishes,
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
ESM Dev
Top achievements
Rank 1
answered on 17 Apr 2009, 03:23 PM
Thanks for your help its fine for dragging. now i need one more that when i change only the end time to that appointment just pulling the bottom of the appointment to the required end date then it should ask a confirmation to the user. could you please give me code for this also.
0
Hi ESM Dev,
You can hook onto the OnClientAppointmentResize event and use the same code as for the drag and drop:
function aptResizeEnd(sender, eventArgs)
{
if (!confirm("Confirm resize?"))
{
eventArgs.set_cancel(true);
}
}
All the best,
Genady Sergeev
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 hook onto the OnClientAppointmentResize event and use the same code as for the drag and drop:
function aptResizeEnd(sender, eventArgs)
{
if (!confirm("Confirm resize?"))
{
eventArgs.set_cancel(true);
}
}
All the best,
Genady Sergeev
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
sharad
Top achievements
Rank 1
answered on 07 May 2009, 02:29 PM
function AppointmentResizeEnd(sender, eventArgs)
{
sender._dragging = false;
if (!confirm("Do you want to change appointment time?"))
{
eventArgs.set_cancel(true);
}
sender._dragging = true;
}
Prompts error at
sender._dragging = true;
when appointment confirmation box is cancelled twice
Error msg
Microsoft JScript runtime error: 'this._draggingAppointment' is null or not an object
0
Hi sharad,
I have tried to reproduce the error, however on my end there is no error after clicking cancel twice. Is there something specific concerning your project? I am attaching my test project to this replay.
Regards,
Genady Sergeev
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.
I have tried to reproduce the error, however on my end there is no error after clicking cancel twice. Is there something specific concerning your project? I am attaching my test project to this replay.
Regards,
Genady Sergeev
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
Stefan
Top achievements
Rank 2
answered on 08 May 2013, 02:13 PM
Is there someway to do this without using the !confirm(textString)?
Im using the code on the Schedule, OnClientAppointmentMoveEnd event.
I would like to show a radconfirm.
radconfirm(textString, confirmAppointmentMoveFn, 400, 100, null, "Flytt av bokning", null);
Im using the code on the Schedule, OnClientAppointmentMoveEnd event.
I would like to show a radconfirm.
radconfirm(textString, confirmAppointmentMoveFn, 400, 100, null, "Flytt av bokning", null);
0
Hello,
I would suggest reviewing our RadScheduler client-side API demo that implements very similar scenario - when user tries to move an appointment that will overlap an already existing appointment, a radconfirm window pops up. Based on the selected option the appointment will be moved to the new time slot or moving will be canceled.
Regards,
Boyan Dimitrov
the Telerik team
I would suggest reviewing our RadScheduler client-side API demo that implements very similar scenario - when user tries to move an appointment that will overlap an already existing appointment, a radconfirm window pops up. Based on the selected option the appointment will be moved to the new time slot or moving will be canceled.
Regards,
Boyan Dimitrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.