01.
protected
void
RadScheduler1_AppointmentDataBound(
object
sender, SchedulerEventArgs e)
02.
{
03.
04.
e.Appointment.ToolTip = e.Appointment.Subject +
": "
+ e.Appointment.Description;
05.
06.
if
(e.Appointment.Attributes[
"JobStatusID"
] == COMMON.Enumerations.JobStatusEnum.BOOKING.ToString())
07.
{
08.
e.Appointment.AllowDelete =
true
;
09.
}
10.
else
if
(e.Appointment.Attributes[
"JobStatusID"
] != COMMON.Enumerations.JobStatusEnum.COMPLETED.ToString() || e.Appointment.Attributes[
"JobStatusID"
] != COMMON.Enumerations.JobStatusEnum.CANCELLEDBYADMINISTRATOR.ToString() || e.Appointment.Attributes[
"JobStatusID"
] != COMMON.Enumerations.JobStatusEnum.CANCELLEDBYMOBILE.ToString() || e.Appointment.Attributes[
"JobStatusID"
] != COMMON.Enumerations.JobStatusEnum.CLOSED.ToString())
11.
{
12.
string
colorValue = COMMON.Enumerations.GetJobStatusColor((COMMON.Enumerations.JobStatusEnum)
int
.Parse(e.Appointment.Attributes[
"JobStatusID"
]));
13.
e.Appointment.BackColor = Color.FromName(colorValue);
14.
e.Appointment.AllowDelete =
false
;
15.
e.Appointment.AllowEdit =
false
;
16.
//e.Appointment.Attributes.CssStyle.Add("rsAptDelete ", "display:none !important;");
17.
}
18.
else
19.
{
20.
string
colorValue = COMMON.Enumerations.GetJobStatusColor((COMMON.Enumerations.JobStatusEnum)
int
.Parse(e.Appointment.Attributes[
"JobStatusID"
]));
21.
e.Appointment.BackColor = Color.FromName(colorValue);
22.
e.Appointment.AllowDelete =
false
;
23.
e.Appointment.AllowEdit =
true
;
24.
//e.Appointment.Attributes.CssStyle.Add("rsAptDelete ", "display:none !important;");
25.
}
26.
}
Hi, the above is my code and Allow Delete & Allow Edit are not working certainly. Does anybody have an idea ?
thank you