Hi Brian,
We regret for the inconvenience caused.
To save and retrieve the data of the newly added fields which are not in the AppointmentSettings, explicit handling of those data fields while saving and retrieving is necessary as depicted below.
For example – We have added a new field Status. The below steps shows how it is processed in each process.
i.) Added new field (Status) to the custom appointment window as given below.
<code>
<tr>
<td>Status:
</td>
<td>
<input type="text" id="Status" />
</td>
</tr>
</code>
ii.) While saving the appointment, you need to explicitly pass those extra fields to the appointment object before it is passed into the saveAppointment client-side method.
<code>
function save() {
--------
--------
obj["Status"] = $("#Status")[0].value; // here new field is added to an appointment.
obj["Recurrence"] = $("#recurrence")[0].checked;
-------
-------
var object = $("#Schedule1").data("ejSchedule");
object.saveAppointment(obj);
clearFields();
}
</code>
iii.) To retrieve those additional details of the appointments while opening the appointment window (by double clicking on the appointments), you need to assign those additional field values to the appointment window fields as follows:
<code>
function onAppointmentWindowOpen(args) {
-----------
-----------
// here binding the new field value in custom window
if (!ej.isNullOrUndefined(args.appointment.Status))
$("#Status").val(args.appointment.Status);
else
$("#Status").val("");
-----------
-----------
}
</code>
iv.) Also, while saving the new appointment data to the database in the server-side along with those extra fields, refer to the below code snippet,
<code>
protected void Schedule1_ServerAppointmentSaved(object sender, Syncfusion.JavaScript.Web.ScheduleEventArgs e) {
-----------
-----------
sql = "insert into ScheduleAppointments (Id,EndTime,Recurrence,StartTime,Subject,AllDay,Status,RecurrenceRule) values(" + list["Id"].ToString() + ",'" + Convert.ToDateTime(list["EndTime"]).ToUniversalTime().ToString() + "','" + list["Recurrence"].ToString() + "','" + Convert.ToDateTime(list["StartTime"]).ToUniversalTime().ToString() + "','" + list["Subject"].ToString() + "','" + list["AllDay"].ToString() + "','" + list["Status"].ToString() + "','" + recurrenceValue + "')";
}
</code>
We have included the above code snippets and prepared a complete sample to show your required scenario, which can be downloaded from the below location -
Regards,
Karthigeyan