Giving color to C1Schedule appointment individually

Posted by: chetankulkarni789 on 10 September 2017, 11:42 am EST

  • Posted 10 September 2017, 11:42 am EST

    I am using C1schedule control for and I am adding appointment to it
    below is my sample code

    C1.C1Schedule.Appointment oppoint = new C1.C1Schedule.Appointment();
    oppoint.End =DateTime.Now.AddHours(2);
    oppoint.Subject = "Urgent Care";

    So it was adding Appointment to the Schedule. But If I would like to give Color to that Appointment then I am not getting its color Property.
    so Can any body help me for giving Color to each Individual Appointment.
  • Replied 10 September 2017, 11:42 am EST

    Hi Chetan,

    To give different colors to individual appointments, you can create your own custom label as follows:


    C1.C1Schedule.Label label1 = new C1.C1Schedule.Label();
    label1.Color = System.Drawing.Color.Violet;
    label1.Text = "CustomLabel1";
    label1.MenuCaption = "CustomLabel1";

    C1.C1Schedule.Appointment app = new C1.C1Schedule.Appointment();
    app.Start = DateTime.Now.AddMinutes(30);
    app.End = DateTime.Now.AddMinutes(35);
    app.Subject = "New Appointment" + DateTime.Now.Minute.ToString();
    // assign the custom label to the appointment
    app.Label = label1;

  • Replied 10 September 2017, 11:42 am EST

    Thanks for Reply,

    Can I able to use these control in Share point Web Part.
  • Replied 10 September 2017, 11:42 am EST

    We have a different suite for Sharepoint webparts. Please refer to the following link for details :

    If you still want to use the controls in Sharepoint, please refer to the following link which might be helpful :

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels