Remove or blank status

3 posts, 0 answers
  1. Jeff
    Jeff avatar
    48 posts
    Member since:
    Apr 2012

    Posted 28 Jul 2014 Link to this post

    I use the status to show whether or not a guest has been assigned to the appointment. If not, this is shown with a white status bar using a custom status. This works great. However, when the status changes, I want to remove the status bar but I can't figure out how. If I set the custom status to transparent, the bar turns gray and if I use a status that doesn't exist, the background is the same color but I still see the border for the status. 

    This is the code. Status 7 works great. Status 6 produces the gray bar but when commented out I get the result seen in the attached image.
    Me.RadScheduler1.Statuses.Add(New AppointmentStatusInfo(6, "Guests", Color.Transparent, Color.Transparent, AppointmentStatusFillType.Solid))
    Me.RadScheduler1.Statuses.Add(New AppointmentStatusInfo(7, "NoGuests", Color.White, Color.White, AppointmentStatusFillType.Solid))


    I want the status bar to go away and the text to move back to the left a little. How can I do this?



    The top of the image shows an appointment before a guest is added and the bottom is with a guest. The lock icon just indicates that the max number of guests have been added and isn't related to this issue.
  2. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 31 Jul 2014 Link to this post

    Hi Jeff,

    Thank for writing.

    You can use the AppointmentFormatting event and disable the additional border: 
    void radScheduler1_AppointmentFormatting(object sender, SchedulerAppointmentEventArgs e)
    {
        if (e.Appointment.StatusId == 6)
        {
            e.AppointmentElement.UseDefaultPaint = true;
        }
        else
        {
            e.AppointmentElement.UseDefaultPaint = false;
        }
      
    }

    I hope this helps. Should you have any other questions do not hesitate to ask.
     
    Regards,
    Dimitar
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jeff
    Jeff avatar
    48 posts
    Member since:
    Apr 2012

    Posted 31 Jul 2014 in reply to Dimitar Link to this post

    This is exactly what I need. Thank you!
Back to Top