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

Disable Appointment Delete

9 Answers 264 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 01 Oct 2007, 08:09 PM
Is there a way to disable the appointment delete.  We need to cancel appointments and keep the appointment information along with the reason for cancellation without removing the original appointment.

9 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 02 Oct 2007, 02:56 PM
Hi Steve Case,

I think you can subscribe to the AppointmentDelete event and set the Cancel property of the event args to true.

        protected void RadScheduler1_AppointmentDelete(object sender, SchedulerCancelEventArgs e)
        {
            e.Cancel = true;
        }

However you should modify your database appropriately so the appointment gets hidden from the user.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Steve
Top achievements
Rank 1
answered on 02 Oct 2007, 02:59 PM
Thanks, that will probabally do what I want it to do.  I was hoping for a way to completly remove the delete option (icon) when you roll-over the appointment but this will work.

Steve
0
Michael Hanson
Top achievements
Rank 1
answered on 03 Oct 2007, 06:57 AM
It would be great if the next release of Scheduler provided options to enable or disable delete on an appointment by appointment basis.  I am using the control for a Meeting Place feature on my site, where anyone can add an appointment, but I only want to allow the creator or administrators to delete an appointment.

I am using the event at the moment, but as suggested this is a reactive approach, i.e. I can't stop users from trying to delete the appointment I have to respond by checking they are permitted when they try, then cancelling the request.  It would be much more elegant if we could hide the Delete button.

Similarly it would be really good to have the ability to hide the Update button in the advanced edit form, to effectively make appointments read only for everyone except the creator and administrators. 
0
T. Tsonev
Telerik team
answered on 03 Oct 2007, 08:48 AM
Hello,

We can employ some CSS tricks to hide the delete button per appointment.

First, we need to define the following CSS style:
<style type="text/css"
    .disableDelete .rsAptDelete 
    { 
        left: -4000px; 
    } 
</style> 
 

This will hide the delete button if some if its parents has the disableDelete style. We can easily set such style per appointment via the AppointmentCreated event:
protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e) 
    e.Appointment.CssClass = "disableDelete"
 

I hope this helps.

Best wishes,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Steve
Top achievements
Rank 1
answered on 03 Oct 2007, 10:32 AM
Thanks, that will do the trick.  I agree with Michael, for future versions it would be nice to have this functionality built in and as stated for the updates too.  I am using this for a medical appointment system and have to be very careful about who has rights to create and delete information.

Steve
0
T. Tsonev
Telerik team
answered on 03 Oct 2007, 10:49 AM
Hello Steve Case,

I agree that it would be nice to have such control out of the box and we are definitely planning to implement it. The trick works for now, but you have to keep the check in the AppointmentDelete event for security's sake. It will not be necessary when we implement the option.

Sincerely yours,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael Hanson
Top achievements
Rank 1
answered on 03 Oct 2007, 11:07 AM
Excellent news

What would be really extra special is if Scheduler could automatically scroll the first appointment in the current view to the top of the viewport.  A lot to ask I know, but it would make it really polished.

My site is global and people could be posting events 24 hours a day, so I have Scheduler show 24 hours, which means people have to scroll to see if there are any meetings or switch to Month view.

I have implemented a side panel like Outlook 2007 which shows the earliest 10 meetings scheduled, it would be nice if I could let users click on these to bring the relevant appointment into view.  So generally the ability to scroll an appointment or time into view would be fantastic.
0
T. Tsonev
Telerik team
answered on 03 Oct 2007, 12:05 PM
Hi Michael Hanson,

I think this will be possible to implement using HTML anchors. We can create a custom appointment template in order to create the anchors:

<AppointmentTemplate> 
    <name='<%# "Apt_" + Eval("ID") %>'></a> 
    <%# Eval("Subject") %> 
</AppointmentTemplate> 

Then you can place a link anywhere in the document in order to scroll to the anchor:

<href="#Apt_18">Appointment with ID 18</a> 

Try it and see if it produces nice results with your page layout. If it does not we will try to think of some different solution.

Kind regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael Hanson
Top achievements
Rank 1
answered on 03 Oct 2007, 12:07 PM
Great idea, thanks for that will implement it tonight and let you know how it goes.
Tags
Scheduler
Asked by
Steve
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Steve
Top achievements
Rank 1
Michael Hanson
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or