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

Disable Client click

3 Answers 65 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Teja
Top achievements
Rank 1
Teja asked on 17 Feb 2011, 12:03 AM
Hi,

In Telerik Rad Scheduler, when a users wants to schedule an appointment, he is allowed to do only once. He has to be disabled from entering again. He can re-schedule again after deleting the first one.
I used the code :
function OnClientAppointmentInserting(sender, agrs) {
               if (sender.get_appointments().get_count() >= 1) 
             {
           agrs.set_cancel(true);
           alert("Sorry..!Only One appointment is allowed. To Re-Schedule, delete ur first appointment and Schedule again");
       }
   }
But, if another user logs into the scheduler, he too is unable to add if there is one schedule already present and his clicks are disabled.
I want this method to be applied separately for each user. It means one user one click on scheduler. Another user one clcik on scheduler irrespective of other schedules present.


3 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 17 Feb 2011, 12:19 PM
Hello Teja,

As an alternative to cancelling the OnClientAppointmentInserting event you can set the AllowInsert property of the RadScheduler to "false" according to the logged user and the count of appointments.

Greetings,
Veronica Milcheva
the Telerik team
0
Teja
Top achievements
Rank 1
answered on 17 Feb 2011, 12:29 PM
Hi,
I did not understand.Can you elaborate with code snippets?
0
Veronica
Telerik team
answered on 23 Feb 2011, 08:45 AM
Hi Teja,

Please accept my apologies for the late reply.

Actually this demo will be helpful for you. Please take a look at it and let me know if this was helpful.

All the best,
Veronica Milcheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
Teja
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Teja
Top achievements
Rank 1
Share this question
or