When appointments created like this way, its getting created 3 separate appointments.
I want to have the connectivity between these appointments to do these tasks,
When edit the first appointment , the other appointments also should update automatically.
When delete the first appointment , the other appointments also should delete automatically.
Currently i'm using the web service method for the data bind.
Thank you
Control Code -
<ej:Schedule StartHour="8" EndHour="18" ShowQuickWindow="true" ShowLocationField="true" ShowAppointmentNavigator="false" Navigation="onNavigation" AppointmentWindowOpen="onAppointmentOpen" BeforeAppointmentRemove="BeforeAppointmentRemove" ResizeStop="ResizeStop" DragStop="DragStop" EnableLoadOnDemand="true" OnServerExportPDF="Schedule1_OnServerExportPDF" OnExportToExcel="Schedule1_ServerExportExcel" ClientIDMode="Static" runat="server" ID="Schedule1" Width="100%" CellHeight="60px" CellWidth="120px" CurrentView="Workweek" Orientation="Horizontal" ShowCurrentTimeIndicator="false">
<TimeScale Enable="true" MajorSlotTemplateId="#majorTemplate" />
<AgendaViewSettings DaysInAgenda="5" />
<ReminderSettings Enable="true" AlertBefore="10" />
<TooltipSettings Enable="True"></TooltipSettings>
<PrioritySettings Enable="true" Text="text" Value="value"></PrioritySettings>
<Resources>
<ej:Resources Field="Categorize" Name="Categorize" Title="Departments" AllowMultiple="true">
<ResourceSettings Color="color" Id="id" Text="text">
</ResourceSettings>
</ej:Resources>
<ej:Resources Field="Owner" Name="Owner" Title="Users" AllowMultiple="true">
<ResourceSettings Color="color" Id="id" Text="text" GroupId="groupId">
</ResourceSettings>
</ej:Resources>
</Resources>
<Group Resources="Categorize,Owner" />
<DataManager CrossDomain="true" URL="Comm_Calander.aspx/Data" CrudURL="Syncfusion_Scheduler_WebService.asmx/CrudResult" InsertURL="Syncfusion_Scheduler_WebService.asmx/InsertData" UpdateURL="Syncfusion_Scheduler_WebService.asmx/UpdateData" RemoveURL="Syncfusion_Scheduler_WebService.asmx/RemoveData" Adaptor="UrlAdaptor" />
<AppointmentSettings Id="Id" ResourceFields="Owner" Subject="Subject" AllDay="AllDay" Priority="Priority" StartTime="StartTime" EndTime="EndTime" Description="Description" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" StartTimeZone="StartTimeZone" EndTimeZone="EndTimeZone" />
</ej:Schedule>
Hi Kavishka,
Greetings from Syncfusion support.
We have validated your query “Connectivity between appointments which created with multiple appointment creation” at our end. You can achieve your requirement by adding a custom field that holds the unique key value for each appointment created at the same time using multiple appointment creation. You can update, edit, and delete the appointments created at the same time with help of a unique key value by querying them and updating them based on the unique key.
Kindly let us know if you need any further assistance.
Regards,
Ravikumar Venkatesan
Thank you. Can I get a sample regarding this functionality please?
Hi Kavishka,
We have validated your query “Can I get a sample regarding this functionality please?” at our end. We have prepared a sample to change the appointment connected to the edited appointment with help of the unique Id value custom field AppointmentGroup, BeforeAppointmentCreate, and BeforeAppointmentChange events of the Schedule.
Kindly try the shared sample and let us know if you need any further assistance on this.
Regards,
Ravikumar Venkatesan
If this post is helpful, kindly consider accepting it as the solution so that other members can locate it more quickly.
Thank you, This is what I'm looking for. But I need to see the users and departments when we double click on a appointment. Currently its showing the details only the which I'm clicking on.
After I load all the users to this window, If I remove one user from it and save the appointment, I need to automatically remove that appointment from the removed user.
And finally can I create recurrence records from this way (Multiple Appointment Create and Edit) and All Day and the Drag and Drop Edit options. Is it possible to use these functions with the multiple appointment creation?
Can i get a sample appreciate it Thank you.
Hi Kavishka,
We have validated your query “I need to see the users and departments when we double click on a appointment” at our end. You can achieve your requirement with help of AllowGroupEditing property of the Schedule group and for the same, we have prepared a sample for your reference.
Demo: https://asp.syncfusion.com/demos/web/schedule/groupedappointments.aspx
[Default.aspx]
|
<ej:Schedule ID="Schedule2"> <resources> <ej:Resources Field="Categorize" Name="Categorize" Title="Departments" AllowMultiple="true"> <resourcesettings id="id" text="text"> </resourcesettings> </ej:Resources> <ej:Resources Field="Owner" Name="Owner" Title="Users" AllowMultiple="true"> <resourcesettings color="color" id="id" text="text" groupid="groupId"> </resourcesettings> </ej:Resources> </resources> <group resources="Categorize,Owner" AllowGroupEditing="true" /> </ej:Schedule> |
Regards,
Ravikumar Venkatesan
If this post is helpful, kindly consider accepting it as the solution so that other members can locate it more quickly.
Hello Thank you for the details.
I made the application with these codes but its throwing an error when I try to add appointment when AllowGroupEditing = "True".
When its false its coming to the web service with these parameters
When AllowGroupEditing = "True", Its not coming to the web service method.
Codes -
<ej:Schedule ShowQuickWindow="true" ShowLocationField="true" BeforeAppointmentCreate="beforeCreate" ShowAppointmentNavigator="false" Navigation="onNavigation" AppointmentWindowOpen="onAppointmentOpen" BeforeAppointmentRemove="BeforeAppointmentRemove" ResizeStop="ResizeStop" DragStop="DragStop" EnableLoadOnDemand="true" OnServerExportPDF="Schedule1_OnServerExportPDF" OnExportToExcel="Schedule1_ServerExportExcel" ClientIDMode="Static" runat="server" ID="Schedule1" Width="100%" CellHeight="60px" CellWidth="120px" CurrentView="Workweek" Orientation="Horizontal" ShowCurrentTimeIndicator="false">
<TimeScale Enable="true" MajorSlotTemplateId="#majorTemplate" />
<AgendaViewSettings DaysInAgenda="5" />
<ReminderSettings Enable="true" AlertBefore="10" />
<TooltipSettings Enable="True"></TooltipSettings>
<PrioritySettings Enable="true" Text="text" Value="value"></PrioritySettings>
<Resources>
<ej:Resources Field="Categorize" Name="Categorize" Title="Departments" AllowMultiple="true" >
<ResourceSettings Id="id" Text="text">
</ResourceSettings>
</ej:Resources>
<ej:Resources Field="Owner" Name="Owner" Title="Users" AllowMultiple="true">
<ResourceSettings Color="color" Id="id" Text="text" GroupId="groupId">
</ResourceSettings>
</ej:Resources>
</Resources>
<Group Resources="Categorize,Owner" AllowGroupEditing="true"/>
<DataManager CrossDomain="true" URL="Comm_Calander.aspx/Data" CrudURL="Syncfusion_Scheduler_WebService.asmx/CrudResult" InsertURL="Syncfusion_Scheduler_WebService.asmx/InsertData" UpdateURL="Syncfusion_Scheduler_WebService.asmx/UpdateData" RemoveURL="Syncfusion_Scheduler_WebService.asmx/RemoveData" Adaptor="UrlAdaptor" />
<AppointmentSettings Id="Id" ResourceFields="Categorize,Owner" Subject="Subject" AllDay="AllDay" Priority="Priority" StartTime="StartTime" EndTime="EndTime" Description="Description" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" StartTimeZone="StartTimeZone" EndTimeZone="EndTimeZone" />
</ej:Schedule>
public class ScheduleData
{
public int Id { get; set; }
public string Subject { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public Boolean AllDay { get; set; }
public Boolean Recurrence { get; set; }
public string RecurrenceRule { get; set; }
public string StartTimeZone { get; set; }
public string EndTimeZone { get; set; }
public string Description { get; set; }
public string Categorize { get; set; }
public int Owner { get; set; }
public string Location { get; set; }
public string Priority { get; set; }
public int Reminder { get; set; }
public string CustomStyle { get; set; }
public string commonGuid { get; set; }
public string AppTaskId { get; set; }
public string Guid { get; set; }
public string AppointmentGroup { get; set; }
}
[WebMethod(EnableSession = true)]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public List<ScheduleData> CrudResult(List<ScheduleData> added, List<ScheduleData> changed, List<ScheduleData> deleted) /*used this method to handle larger window insert update and delete*/
{
DatabaseInfo conn = DataSvc.GetDatabaseInfo();
SqlConnection connection = new SqlConnection(conn.sConnString);
string userIDsRemovedChar = Convert.ToString(Session["userIDsRemovedChar"]);
string DepartmentIDsRemovedChar = Convert.ToString(Session["DepartmentIDsRemovedChar"]);
DateTime startDate = Convert.ToDateTime(Session["startDate"]);
DateTime endDate = Convert.ToDateTime(Session["endDate"]);
if(DepartmentIDsRemovedChar == string.Empty)
{
DepartmentIDsRemovedChar = "0";
}
if (added != null && added.Count > 0) // this block of code will execute while inserting the appointments
{
int a = 0;
while (a <= added.Count - 1)
{
var value = added[a];
a += 1;
if ((value.Owner != 0 || userIDsRemovedChar != string.Empty) && ((value.Categorize != null && value.Categorize != string.Empty ) || DepartmentIDsRemovedChar != string.Empty))
{
string CreatedBy = User.Identity.Name;
schedule_data scheduleData = new schedule_data();
scheduleData.InsertDataLargeWindow(value,CreatedBy);
}
}
}
if (deleted != null && deleted.Count > 0) // this block of code will execute while removing the appointment
{
foreach (var apps in deleted)
{
int id = apps.Id;
schedule_data scheduleDate = new schedule_data();
scheduleDate.RemoveDataLarge(id);
}
}
if (changed != null && changed.Count > 0)// this block of code will execute while updating the appointment
{
var value = changed[0];
if ((value.Owner != 0 || userIDsRemovedChar != string.Empty) && ((value.Categorize != null && value.Categorize != string.Empty ) || DepartmentIDsRemovedChar != string.Empty))
{
schedule_data scheduleData = new schedule_data();
scheduleData.UpdateDataLarge(value);
}
}
Session.Remove("userIDsRemovedChar");
Session.Remove("DepartmentIDsRemovedChar");
return GetData(startDate,endDate);
}
Thank you.
Hi Kavishka
We have checked on your shared codes and suspect the Fields for the Owner and Categorize are not given in array of values when allowMultiple is true which might have cause this issue. Kindly try Fields in array values and let us know if this has resolved your issue.
Regards,
Ruksar Moosa Sait