delete msg ID
Good afternoon. My name is Amaro Sousa and I'm studying your Schedule javascript.I just tried to get the appointment.Id when I run the delete but to no avail .I would like to request your help
Example:
<div
id="Schedule"></div>
<script>
$("#Schedule").ejSchedule({
appointmentSettings: {
dataSource: [{
Id: 101,
Subject: "Talk
with Nature",
StartTime: new
Date(2014, 4, 5, 10, 00),
EndTime: new Date(2014,
4, 5, 12, 00),
AllDay:true,
Recurrence:false,
RecurrenceRule:null,
StartTimeZone:
"UTC +00:00",
EndTimeZone: "UTC
+00:00
},
{
Id: 102,
Subject: "Play
with Pets",
StartTime: new
Date(2014, 4, 6, 10, 00),
EndTime: new Date(2014,
4, 6, 12, 00),
AllDay:false,
Recurrence:false,
RecurrenceRule:null,
StartTimeZone:
"UTC +00:00",
EndTimeZone: "UTC
+00:00
}]
id: "Id",
startTime:
"StartTime",
endTime: "EndTime",
subject:
"Subject",
allday:"AllDay",
recurrence:"Recurrence",
recurrenceRule:"RecurrenceRule",
startTimeZone:
"StartTimeZone",
endTimeZone:
"EndTimeZone"
},
appointmentDeleted: function (args) {
Alert(appointment.id)
}
});
</script>
Thanks for contacting Syncfusion support.
We have prepared the following code example to meet your requirement, “Displaying Id of deleted appointment”. When the appointment is deleted, appointmentDeleted event will trigger. In that event function, we can only retrieve the deleted appointment’s details by using args variable.
JS Playground Link:
http://jsplayground.syncfusion.com/iuqplxy0
<Code>
<script type="text/javascript">
$(function () {
var dManager = ej.DataManager(window.Default).executeLocal(ej.Query().take(10));
$("#Schedule1").ejSchedule({
------------
------------
appointmentSettings: {
----------
----------
},
appointmentDeleted: function (args) {
// args.appointment - Details of the normal appointment to be deleted will be retrieved
// args.appointment[0] - Details of the recurrence appointment to be deleted will be retrieved
//args.type - event name will be retrieved
if (ej.isNullOrUndefined(args.appointment[0]))
alert(args.appointment.Id);
else
alert(args.appointment[0].Id);
}
});
});
</script>
</Code>
Regards,
Karthigeyan
- 1 Reply
- 2 Participants
-
AM amaro
- Nov 24, 2015 02:23 PM UTC
- Nov 25, 2015 04:59 AM UTC