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.
Unfortunately, activation email could not send to your email. Please try again.

Some help with custom window

Thread ID:

Created:

Updated:

Platform:

Replies:

124915 Jul 8,2016 10:27 AM Jul 12,2016 12:50 PM ASP.NET MVC 3
loading
Tags: Schedule
Simon Roberts
Asked On July 8, 2016 10:27 AM

Hello,

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.

https://www.dropbox.com/s/lq2mlbr0sr90ig0/ELHTResourcingv2.rar?dl=0

Thanks

Simon



Mahesh Palanisamy [Syncfusion]
Replied On July 11, 2016 09:28 AM

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. 

<Code> 
@(Html.EJ().Schedule("Schedule1") 
        .Width("100%") 
        .Height("525px") 
        .CurrentDate(new DateTime(2015, 11, 10)) 
            .AppointmentSettings(fields => fields.Datasource(ds => ds.URL("/Home/GetData").CrudURL("/Home/Batch").Adaptor("UrlAdaptor")) 
            .Id("Id") 
            .Subject("Subject") 
            .StartTime("StartTime") 
            .EndTime("EndTime") 
            .Description("Description") 
            .AllDay("AllDay") 
            .Recurrence("Recurrence") 
            .RecurrenceRule("RecurrenceRule")) 
        .ScheduleClientSideEvents(evt => evt.AppointmentWindowOpen("onAppointmentWindowOpen")) 
) 

</Code> 

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

Regards, 
Mahesh 


Simon Roberts
Replied On July 11, 2016 10:34 AM

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.

Sellakumar [Syncfusion]
Replied On July 12, 2016 12:50 PM

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: 
 
<code> 
 
    @Scripts.Render("~/bundles/jquery") 
    @Scripts.Render("~/bundles/bootstrap") 
    @Scripts.Render("~/Scripts/jquery.easing.1.3.js") 
    @Scripts.Render("~/Scripts/jsrender.min.js") 
    @Scripts.Render("~/Scripts/ej/web/ej.web.all.min.js") 
    @RenderSection("scripts", required: false) 
    @RenderSection("ScriptSection", required: false) // add this scriptSection 
    @Html.EJ().ScriptManager() 
 
</code> 

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

<code> 

@section ScriptSection{ 
 
<script> 
 
        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() { 
            clearFields(); 
            $("#customWindow").ejDialog("close"); 
        }    
 
</script> 
 
} 

</code> 

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. 
 
Regards, 
Sellakumar K

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;