BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi William,
Thanks for using Syncfusion products.
We suspect that the reported issue “Stack overflow exception” may occur due to the “UnobtrusiveJavaScriptEnabled” is enabled in your application. Therefore, we suggest you to disable the “UnobtrusiveJavaScriptEnabled” in your application to overcome the reported issue.
Here’s a code snippet to help you avoid this issue :
<code>
Web.Config:
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="false" />
</appSettings>
</code>
We have also prepared a sample with the above code snippets changes, which can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/directtrac/118267/ScheduleNuget-128356570.zip
Please let us know if it helps and if you need any further assistance on this.
Regards,
Hi William,
Thanks for your update.
We regret for the inconvenience caused. We can overcome the mentioned issue “Context menu not working while disabling the showQuickWindow”. Please find the following code snippet to meet your requirement.
<code>
@(Html.EJ().Schedule("Schedule1")
.Width("100%")
.Height("525px")
.CurrentDate(new DateTime(2014, 6, 1))
.ScheduleClientSideEvents(even=>even.CellClick("onCellQuickWindowClose").AppointmentClick("onAppQuickWindowClose"))
.CategorizeSettings(Fields => Fields.Datasource((System.Collections.IEnumerable)ViewBag.categorize).Enable(true).AllowMultiple(false).Id("id").Text("text").Color("color").FontColor("fontColor"))
.ContextMenuSettings(menu => menu.Enable(true).MenuItems(item => item.Cells(ViewBag.cell).Appointment(ViewBag.app)))
.AppointmentSettings(fields => fields.Datasource((System.Collections.IEnumerable)ViewBag.datasource)
.Id("Id")
.Subject("Subject")
.StartTime("StartTime")
.EndTime("EndTime")
.Description("Description")
.AllDay("AllDay")
.Recurrence("Recurrence")
.RecurrenceRule("RecurrenceRule")
.Categorize("Categorize"))
)
<script type="text/javascript">
function onCellQuickWindowClose(args) {
var dialog = $("#Schedule1AppointmentQuickWindow").data("ejDialog");
dialog.close(); // Here we are closing the quick appointment window
}
function onAppQuickWindowClose(args) {
var dialog = $("#Schedule1AppDetailsWindow").data("ejDialog");
dialog.close(); // Here we are closing the quick appointment window
}
</script>
</code>
We have prepared the sample with the above code snippets, which can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/directtrac/general/ScheduleNuget-2089236857.zip
Note: We have prepared the sample in the MVC platform as per the platform selected by you while creating the forum. If your platform differs from this (MVC) and if you have any concerns in the platform selection and also if we misunderstood your requirements means, kindly revert back to us with some more information about your requirement and which is more helpful for us to analyse and provide you the better solution on this.
Please let us know if it helps and if you need any further assistance on this.
Regards,
Velmurugan
Hi William,
Thanks for your update.
We would like to inform you that, we will fix the “context menu related issue” and it will be included in our upcoming main release volume 1, 2015.
And we can enable the “CategorizeSettings” in the second call ( via Set Model). Please find the following code snippet to enable the “CategorizeSettings” in through the set model.
<code>
@(Html.EJ().Schedule("Schedule1")
.Width("100%")
.Height("525px")
.CurrentDate(new DateTime(2014, 6, 1))
.ScheduleClientSideEvents(even=>even.CellClick("onCellQuickWindowClose").AppointmentClick("onAppQuickWindowClose"). BeforeContextMenuOpen("categorizeEnable")) // Here we are declaring the method “categorizeEnable” to enable the categorize settings
.CategorizeSettings(Fields => Fields.Datasource((System.Collections.IEnumerable)ViewBag.categorize).Enable(false).AllowMultiple(false).Id("id").Text("text").Color("color").FontColor("fontColor")) // Here we are disabling the categorize settings for initial rendering
.ContextMenuSettings(menu => menu.Enable(true).MenuItems(item => item.Cells(ViewBag.cell).Appointment(ViewBag.app)))
.AppointmentSettings(fields => fields.Datasource((System.Collections.IEnumerable)ViewBag.datasource)
.Id("Id")
.Subject("Subject")
.StartTime("StartTime")
.EndTime("EndTime")
.Description("Description")
.AllDay("AllDay")
.Recurrence("Recurrence")
.RecurrenceRule("RecurrenceRule")
.Categorize("Categorize"))
)
<script type="text/javascript">
function categorizeEnable(args) { // This method will trigger when you right click on the Schedule Cell or Appointment
var scheContextObj = $("#Schedule1").data("ejSchedule");
scheContextObj.option("categorizeSettings.enable", true); // Here we are enabling the CategorizeSettings
}
</script>
</code>
We have also modified the previously provided sample with the above code snippet changes, which can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/directtrac/118267/ScheduleNuget2120582257.zip
Please let us know if it helps and if you need any further assistance on this.
Regards,
Velmurugan
Thank you for your reply. The sample works for me; however unobtrusive javascript is required for my projects all over the place. I turned to creating the Schedule directly using javascript and encountered some strange behaviors:
I cannot mix option showQuickWindow with others in a single call to ejSchedule, otherwise the context menu won't work. e.g.
instead of:
$("#calendar").ejSchedule({
dateFormat: "dd-MMM-yyyy",
timeMode: ej.Schedule.TimeMode.Hour24,
currentView: ej.Schedule.CurrentView.Month,
enableAppointmentNavigation: false,
highlightBusinessHours: false,
showQuickWindow: false,
contextMenuSettings: {
enable: true,
menuItems: {
appointment: [
{ id: "open", text: "Open Appointment" },
{ id: "delete", text: "Delete Appointment" }
],
cells: [
{ id: "new", text: "New Appointment" },
{ id: "today", text: "Today" },
{ id: "gotodate", text: "Go to date" }
]
}
}
});
I need to remove the option showQuickWindow, then make a second call to ejSchedule:
$("#calendar").ejSchedule({ showQuickWindow: false });
<body>
@Html.EJ().ScriptManager()
@RenderSection("scripts", required: false)
</body> |