Hello All,
I have two adjustent DayPilotCalendar controls. one for appointment list and other is for waiting list.
In the database, I have a table called appointment. In that we have field IsConfirm, It has two values 0 for appointment, 1 for waiting. Based on this I am binding the records to both controls.
while the event is rendering on the in the page i put image in the event box in following manner. and i want a particular functionality on that image click.
protected void DayPilotCalendar1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
{
e.InnerHTML = "<img src='images/blank.gif' onclick=abc('Done',"
+ e.Tag["appointmentid"].ToString() + "); width=10px height=10px style='background-color:Red'/>";
}
onclick i am calling javascript function abc(status,Value);
Now in abc() function in javascript is written in following.
function abc(command, number) {
dpc2.commandCallBack(command, { id: number });
dpc1.commandCallBack(command, { id: number });
}
It is going to server side and calling DayPilotCalendar2_Command, DayPilotCalendar1_Command
in DayPilotCalendar2_Command i take the command name and id
protected void DayPilotCalendar2_Command(object sender, DayPilot.Web.Ui.Events.CommandEventArgs e)
{
switch (e.Command)
{
case "Done":
string id = (string)e.Data["id"];
// I take value of id and update isconfirm to 1 so ti will go to waiting
break;
}
// I bind the data to the Control and updating the control.
DayPilotCalendar2.Update(CallBackUpdateType.Full);
}
protected void DayPilotCalendar1_Command(object sender, DayPilot.Web.Ui.Events.CommandEventArgs e)
{
// I bind the data to the Control and updating the control.
DayPilotCalendar1.Update(CallBackUpdateType.Full);
}
The value is changed in the database but the DayPilotCalendar values and not changing.
for more clearfication have a look at attatched image.
Thanks and Regards
Harshad Jadhav