Allow Delete & Edit are not working

2 posts, 0 answers
  1. Mehmet
    Mehmet avatar
    100 posts
    Member since:
    Jun 2014

    Posted 24 Jun 2014 Link to this post

    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

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 26 Jun 2014 Link to this post

    Hello,

    I would like to clarify that the appointment AllowDelete and AllowEdit functionalities  work as expected in Q2 2014 (version 2014.2 618). AllowDelete will not show the delete icon in upper left corner of the appointment so user is not able to delete the appointment. When AllowEdit is enabled the advanced form will not open if user double clicks on an appointment.

    Regards,
    Boyan Dimitrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top