Schedule control is not loading when not using the System.Web.UI.Page

I'm trying to use the schedule control in a web form application where they use there own controls. Therefor it is not possible to Inherit from System.Web.UI.Page.
It seems that the JavaScript is rendered, but the divs are not.

Is there any other way to render the schedule control in a web form application (besides probably the JavaScript variant) without having to Inherit from System.Web.UI.Page?

5 Replies

VS Velmurugan S Syncfusion Team April 17, 2018 12:59 PM UTC

Hi Klaas, 

Thanks for Contacting Syncfusion support. 

We have prepared the sample for your requirement to use JavaScript Schedule control in Webform application, which can be downloaded from the following location. 


Kindly try with the above sample and let us know if you need any further assistance on this. 

Regards, 
Velmurugan


KL Klaas April 25, 2018 09:09 PM UTC

Hi Velmurugan,

Thank you for your help. I've tried your example, but at first it did not work. Finally what I had to do was including the js files below the js files that where added to the page by the application itself. So I figured out, if that works, the ASP.NET Web Form control should also work this way and it does. So I followed the steps in this link:

https://www.syncfusion.com/kb/5182/how-to-perform-the-crud-operation-in-the-schedule-control-with-webservices-datasource

And created the methods to perform CRUD. (FYI instead of the webservice I use a repository). The Methods work (did not implement the delete method yet) except one method (Schedule1_ServerAppointmentEdited) keeps giving the following error: "The given key was not present in the dictionary". I think this is strange, because the method is actually the same as the methods Schedule1_ServerResizeStop and Schedule1_ServerDragStop. And those two methods work fine. It seems that list is not populated.

I use the following code in the code behind:

Protected Sub Schedule1_ServerAppointmentEdited(sender As Object, e As Syncfusion.JavaScript.Web.ScheduleEventArgs)
        Arguments = TryCast(e.Arguments("appointment"), Dictionary(Of String, Object))
       
        Dim list = TryCast(Arguments, Dictionary(Of String, Object))
        descriptionValue = If(list.ContainsKey("Description") = False, "", list("Description").ToString())

        _scheduleRepo.Update(list("Id").ToString(), list("Subject").ToString(), descriptionValue.ToString(), 
                    Convert.ToDateTime(list("StartTime")).ToUniversalTime().ToString(), Convert.ToDateTime(list
                    ("EndTime")).ToUniversalTime().ToString(), Convert.ToBoolean(list("AllDay"))) 
       
        BindAppointments()

    End Sub

Thank you for your help.

Regards,

Klaas


VS Velmurugan S Syncfusion Team May 1, 2018 03:39 PM UTC

Hi Klaas,  
We suspect that the reason for the issue might be due to the arguments value coming as null or in some other format while editing the appointment. Also, the argument details receiving in the server side events will vary on editing action and resizing or dragging actions. Therefore, we request you to check the arguments value for null or undefined values and then proceed to perform the CRUD operations. We have prepared the sample with repository model to perform the CRUD operation, which can be downloaded from the following location in this sample and the editing appointment action works properly. 
In the above sample, we used the updated server side events “OnServerAppointmentRemoved, OnServerAppointmentCreated, OnServerAppointmentChanged” instead of the deprecated events “OnServerAppointmentDeleted, OnServerAppointmentSaved, OnServerAppointmentEdited”. 
Kindly try with the above sample, and in case if you still face the same problem at your end, kindly revert back to us with some more details like arguments value coming in the server side events or reproduce the issue in the above sample. The information shared by you will be more helpful for us to analyze your issue and provide you the prompt solution.  
Regards, 
Velmurugan


KL Klaas May 1, 2018 06:57 PM UTC

Hi Velmurugan,

Thank you very much for your help. The problem was in the depreciated events. After changing this, it started working.

Best regards,


Klaas


VS Velmurugan S Syncfusion Team May 2, 2018 12:27 PM UTC

Hi Klaas, 
 
Thanks for you update. 
 
We are glad that our given solution helped you to resolve the reported issue. Please let us know if you need any further assistance on this. 
 
Regards, 
Velmurugan 


Loader.
Up arrow icon