We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Urgent question please - Schedule Control

Hello,

There is no Schedule control option in 'Control' dropdown list selection so I just selected the first one which is Accordion.

We have a problem with schedule control, our user can double-click an appointment item, but can't do anything about it anyway which is good, because it should be read-only. But we want to disable the double-click altogether, or if this is not possible then just remove the UPDATE button in the form (Add/Edit Appointment form) to let our user know that an item is read-only.

How do we do this? Hope to hear from you asap as this is somewhat an urgent issue in our production.

Thank you.

3 Replies

UM Uma Maheswari C Syncfusion Team October 20, 2014 07:47 PM UTC

Hi Gary Almonte,

 

Thanks for using Syncfusion products.

 

As per the query that you have mentioned in your update, we are providing you the solution for the Schedule control in Classic ASP.NET platform (We are confirming this platform from 2 of the points that you have mentioned in your update as – i) UPDATE button, which is present by the same name in the appointment window of the Classic ASP.NET schedule. ii) Add/Edit Appointment form – which is again used with the same name only under the Classic ASP.NET schedule control).

 

Now coming to the solution for your required scenario, it is possible to prevent the display of appointment window while double clicking on the appointments, just by making use of the “ClientSideOnAppointmentWindowBeforeShow” client-side event of the schedule control (Classic ASP.Net) as below,

 

<code>

<syncfusion:Schedule ID="Schedule1" ClientSideOnAppointmentWindowBeforeShow="BeforeShow(this)" runat="server" Height="200px" Width="250px">

</syncfusion:Schedule>

 

<script type="text/javascript">

     function BeforeShow(args) {

        if($(args.Event.currentTarget).hasClass("Appointment")) // To check whether the current target is appointment

            args.Cancel = true; // To prevent the display of appointment window.

     }

</script>

</code>

 

By doing so as above, you can achieve your requirement of disabling the double click on the appointments. (i.e., the user can double click on the appointments, but the appointment window doesn’t show up.)

 

Note: As you have created this forum query in ASP.NET MVC platform, could you please let us know whether the solution provided above is what you expected, or else if we have misunderstood your query or if the above solution doesn’t meets your requirement, kindly provide us with clear platform information, so that we can assist you better. Also, you have mentioned in the first line as you couldn’t able to find the schedule control in the “control” dropdown list selection – Please provide us clear information on this too. We are happy to assist you further.

 

For your reference, we are also attaching the simple sample at the end of this update. Please let us know, if you need any further assistance on this.

 

Regards,

C. Uma Maheswari


Attachment: WebApplication18_a26197ec.zip


GA Gary Almonte October 20, 2014 08:15 PM UTC

Thank you Uma,

It is working now, right in time for our patch release, thank you very much for the speedy response.

I have one question though, which is not as urgent. If I want to:
1. Make the appointment READONLY so user cannot click it, what's the code for this?
2. Can click the appointment and display the information on the pop-up window (existing/default behaviour) but make all the controls READONLY or remove the UPDATE button, what's the code for this?

regards


VS Velmurugan S Syncfusion Team October 23, 2014 12:50 PM UTC

Hi Gary,

Thanks for your update.

Please find the responses for your queries:

Query #1: Make the appointment READONLY so user cannot click it, what's the code for this?

We regret to let you know that, currently we do not have default “ReadOnly” support for the schedule control “Appointments”. We can block the display of the appointment window just by the workaround solution provided in the previous update.

 

Query #2: . Can click the appointment and display the information on the pop-up window (existing/default behaviour) but make all the controls READONLY or remove the UPDATE button, what's the code for this?

 

Since there is no default support to make all the controls on the pop-up window as read-only, therefore to disable the update button from the appointment window while double clicking on the appointments, make use of the “ClientSideOnAppointmentWindowShow” client-side event of the schedule control (Classic ASP.Net) as below.

 

<code>

 

<syncfusion:Schedule ID="Schedule1" ClientSideOnAppointmentWindowShow="AfterShow(this)" runat="server" Height="500px" Width="550px">

</syncfusion:Schedule>

 

<script type="text/javascript">

     function AfterShow(args) {

             $("#btnEditAppointment").attr("disabled",true);

     }

</script>

 

</code>

 

For your reference, we are also attaching the sample with the above mentioned code snippet at the end of this update. Please let us know, if you need any further assistance on this.

Regards,

Velmurugan


Attachment: WebApplication18_8cdda3af.zip

Loader.
Live Chat Icon For mobile
Up arrow icon