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

Server events not triggering

I wan't to implement CRUD operations on Schedule control, but somehow events are not triggering.

Here are two short snippets of my code, I have deleted some of it for easier reading, But full solution is attached in zip file.

Default.aspx.cs
protected EventRepository EventRepository { getset; } = new EventRepository();
 
protected void Page_Load(object sender, EventArgs e)
{
    Schedule.ServerAppointmentCreated += Schedule_ServerAppointmentCreated;
    Schedule.ServerAppointmentSaved += Schedule_ServerAppointmentSaved;
 
    BindEvents();
}
 
private void Schedule_ServerAppointmentSaved(object sender, ScheduleEventArgs e)
{
    throw new NotImplementedException();
}
 
private void Schedule_ServerAppointmentCreated(object sender, ScheduleEventArgs e)
{
    throw new NotImplementedException();
}
 
private void BindEvents()
{
    Schedule.AppointmentSettings.DataSource = EventRepository.Get();
    Schedule.DataBind();
}

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Naloga.Default" %>
 
 
<!DOCTYPE html>
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Events</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 
    <link rel='nofollow' href="Content/ej/web/default-theme/ej.web.all.min.css" rel="stylesheet" />
    <link rel='nofollow' href="Content/ej/web/ej.widgets.core.min.css" rel="stylesheet" />

    <script src='<%= Page.ResolveClientUrl("~/Scripts/jquery-1.10.2.min.js")%>' type="text/javascript"></script>
    <script src='<%= Page.ResolveClientUrl("~/Scripts/jsrender.min.js")%>' type="text/javascript"></script>
    <script src='<%= Page.ResolveClientUrl("~/Scripts/jquery.easing.1.3.min.js")%>' type="text/javascript"></script>
    <script src='<%= Page.ResolveClientUrl("~/Scripts/globalize.js")%>' type="text/javascript"></script>
    <script src='<%= Page.ResolveClientUrl("~/Scripts/ej/ej.web.all.min.js")%>' type="text/javascript"></script>
    <script src='<%= Page.ResolveClientUrl("~/Scripts/ej/ej.webform.min.js")%>' type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ej:Schedule ID="Schedule"
            runat="server">
            <AppointmentSettings Id="Id"
                Subject="Name"
                StartTime="From"
                EndTime="To"
                Description="Description" />
        </ej:Schedule>
    </div>
    </form>
</body>
</html>

Attachment: EventTriggering_bd104a0c.zip

1 Reply

KK Karthigeyan Krishnamurthi Syncfusion Team July 18, 2016 01:48 PM UTC

Hi Matjaz, 
 
Thank you for contacting Syncfusion support. 
 
We suspect that Scheduler events are not defined in the Default.aspx page which may be the cause for the issue. Kindly visit the below KB links to know more about the CRUD operation in Scheduler. 
 
If the above suggestions doesn’t meet your requirement, kindly revert. 
 
Regards, 
Karthigeyan 


Loader.
Up arrow icon