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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

StackOverflow exception

Thread ID:

Created:

Updated:

Platform:

Replies:

118267 Feb 18,2015 03:28 AM UTC Feb 28,2018 07:45 PM UTC ASP.NET MVC 7
loading
Tags: Schedule
William Wong
Asked On February 18, 2015 03:28 AM UTC

Hi, I am trying to test with the Schedule control but encountered a strange overflow exception. I created a new MVC5 project, updated all packages and installed SyncFusion via nuget and replaced the Index.cshtml file with:

<link rel='nofollow' href="~/Content/ej/web/bootstrap-theme/ej.web.all.min.css" rel="stylesheet" />
<script src="~/Scripts/ej/ej.web.all.min.js"></script>
@(Html.EJ().Schedule("Schedule1"))

Execution of the test web via IIS or inside VS 2013 resulted in stackoverflow. Perhaps I have made some stupid mistakes. Any idea?

Velmurugan S [Syncfusion]
Replied On February 18, 2015 10:46 AM UTC

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,

Velmurugan

William Wong
Replied On February 24, 2015 06:47 AM UTC

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 });

Velmurugan S [Syncfusion]
Replied On February 25, 2015 12:33 PM UTC

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



William Wong
Replied On February 26, 2015 04:01 AM UTC

Thank you very much for your help. Although I am using MVC platform for my project, I am using the javascript only for the Schedule related pages since I found it not playing nicely with unobtrusive javascript. With reference to your sample, I managed to get context menu working but the window closing caused a flicker of the shadow line of the dialog? I hope that context menu would be fixed in the coming release. I have another finding: the grid loading won't work with categorizeSettings enabled with context menu? My workaround is to enable categorizeSettings in another call to ejSchedule, e.g. $("#calendar").ejSchedule({ categorizeSettings: { enable: true } });

Velmurugan S [Syncfusion]
Replied On February 27, 2015 08:28 AM UTC

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



shoaib Tabassum
Replied On February 24, 2018 09:23 PM UTC

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 });

complete information and guidance


Nevitha Ravi [Syncfusion]
Replied On February 28, 2018 07:45 PM UTC

Hi Shoaib, 

We have prepared a Schedule sample by enabling context menu and disabling the quick window options, with unobtrusive mode enabled on the application which can be downloaded from the following link. The reported scenarios works properly now with this sample. 

Kindly ensure the below given things are done properly from application end while making use of unobtrusive mode –  
  1. The ej.unobtrusive.min.js script should be referred next to the ej.web.all.min.js file reference.
  2. If unobtrusive is set to true in the application, the below highlighted script manager code can be excluded from the _Layout.cshtml file present within the ~/Views/Shared folder of your application, as the control will be initialized by using HTML5 attributes.
    <body> 
        @Html.EJ().ScriptManager() 
        @RenderSection("scripts", required: false) 
    </body> 

For further reference, please check this common link on unobtrusive - https://help.syncfusion.com/aspnetmvc/unobtrusive  

Kindly check and revert us back with more details about your requirement, if we misunderstood your query. 

Regards, 
Nevitha

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.

Warning Icon 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.Close Icon

;