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

Schedule clearing all appointments after batch

We have CRUD operations for appointments. The operations work as expected, except in the case of the batch edit (Create, Update).

When the batch edit is invoked, the operation runs correctly, inserts/changes/deletes the data in the database, the new appointments are read and returned as a JsonResult. (so far so good)

However after batch the Schedule component is completely cleared and we have to refresh the entire page to get them to show.

Any idea why this might be the case?

I am not seeing any javascript errors in Developer Tools (F12), in my debugging session from Visual Studio and there is nothing out of the ordinary in Fiddler.

2 Replies

AJ Ajay replied to Vlatko March 18, 2017 05:02 PM UTC

We have CRUD operations for appointments. The operations work as expected, except in the case of the batch edit (Create, Update).

When the batch edit is invoked, the operation runs correctly, inserts/changes/deletes the data in the database, the new appointments are read and returned as a JsonResult. (so far so good)

However after batch the Schedule component is completely cleared and we have to refresh the entire page to get them to show.

Any idea why this might be the case?

I am not seeing any javascript errors in Developer Tools (F12), in my debugging session from Visual Studio and there is nothing out of the ordinary in Fiddler.

Hi,

I'm facing the same issue. Can someone help?

Thanks.


KK Karthigeyan Krishnamurthi Syncfusion Team March 20, 2017 08:37 AM UTC

Hi Ajay/Vlatko, 
 
Thank you for contacting Syncfusion support. 
 
We suspect that appointment Start/EndTime are not in correct format after performing CRUD operation which could be the cause for the issue. Kindly use the below code example to overcome the reported issue. 
 
<Code> 
<ej-schedule id="Schedule1" width="100%" height="525px" create="onCreate" current-date="new DateTime(2014, 12, 5)"> 
    <e-appointment-settings apply-time-offset="false" id="Id" subject='"Subject"' start-time='"StartTime"' end-time='"EndTime"' all-day='"AllDay"' recurrence='"Recurrence"' recurrence-rule='"RecurrenceRule"'> 
        <e-datamanager url="Home/GetData" crud-url="Home/Batch" adaptor="UrlAdaptor"></e-datamanager> 
    </e-appointment-settings> 
</ej-schedule> 
 
<script > 
    function onCreate(args) { // this function will be called during the initial load of the Schedule 
        Date.prototype.parseISO8601 = function (date) { 
            return (typeof (date) === 'string') ? date.indexOf("Date") != -1 ? new Date(parseInt(date.match(/\d+/).toString())) : date.indexOf("T") != -1 ? new Date(date) : new Date(date.replace(/-/g, "/")) : new Date(date); 
        }; 
    } 
</script> 
</Code> 
 
Regards, 
Karthigeyan 
 


Loader.
Up arrow icon