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
close icon

Some help with custom window


Im not expert in MVC as of yet and im trying to create a custom window with validation, IM having a problem with the Window not rendering when entering and appointment. In particular i think this line might be an issue

.AppointmentSettings(fields => fields.Datasource(ds => ds.URL("/Calendar/GetData").CrudURL("/Calendar/Batch").Adaptor("UrlAdaptor"))

If i write it like below i get compilation errors even the solution builds

.AppointmentSettings(fields => fields.Datasource(ViewBag.dataSource),(ds => ds.URL("/Calendar/GetData").CrudURL("/Calendar/Batch").Adaptor("UrlAdaptor"))

Anyway i have added my project below for you to take a look at.




3 Replies

MP Mahesh Palanisamy Syncfusion Team July 11, 2016 01:28 PM UTC

Hi Simon, 

Thank you for contacting Syncfusion support.  

We have prepared the sample for your requirement “create a custom window with validation” which can be downloaded from the following location: 

In the above sample we have used the following code to bind data source to schedule – which calls the appropriate server actions. 

        .CurrentDate(new DateTime(2015, 11, 10)) 
            .AppointmentSettings(fields => fields.Datasource(ds => ds.URL("/Home/GetData").CrudURL("/Home/Batch").Adaptor("UrlAdaptor")) 
        .ScheduleClientSideEvents(evt => evt.AppointmentWindowOpen("onAppointmentWindowOpen")) 


Kindly refer the sample and let us know, if you need any further assistance on this. 


SR Simon Roberts July 11, 2016 02:34 PM UTC

Ive changed my solution slightly and i just cant get the appointment window to render, If i double click or press edit appointment in the mini window my custom window does not render.

SE Sellakumar Syncfusion Team July 12, 2016 04:50 PM UTC

Hi Simon,  
Thanks for your update. 
We have analyzed your previously provided project further and suspect that the script section are not rendered properly in it, so that it might cause such issue(The custom window is not opened). Please make the below changes as highlighted in your project. 
In _Layout.cshtml, we need to render the script section. The code block is as follows: 
    @RenderSection("scripts", required: false) 
    @RenderSection("ScriptSection", required: false) // add this scriptSection 

In View page, need to define the script section. The code block is as follows: 


@section ScriptSection{ 
        var Owners = [ 
            { text: "Nancy", id: 1, groupId: 1, color: "#ffaa00" }, 
            { text: "Steven", id: 3, groupId: 2, color: "#f8a398" }, 
            { text: "Michael", id: 5, groupId: 1, color: "#7499e1" } 
        function cancel() { 


Kindly try out our above suggestion and let us know, if it solves your reported problem and also let us know, if you need any further assistance on this. 
Sellakumar K

Live Chat Icon For mobile
Up arrow icon