Customize Appointment with round corners

6 posts, 0 answers
  1. ravi
    ravi avatar
    21 posts
    Member since:
    Nov 2008

    Posted 30 Jun 2009 Link to this post

    1 HI  
    2  
    3    Here i am facing problem with round corner for appointment.  
    4 I want to customizes appointment with roundcorner with dynamic color.  
    5 i want to apply color when the create an appointment.  
    6  
    7 I tried with existing styles of radschedular but dynamic color not applying.  
    8 and tried with customize rounded corners. its working for an aapointment but while dragging , its not working.  
    9  
    10 <AppointmentTemplate>  
    11 <asp:PlaceHolder ID="PlaceHolder_AppointmentCell" runat="server"></asp:PlaceHolder>    
    12 </AppointmentTemplate>  
    13  
    14  
    15 protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)  
    16 {  
    17 if (e.Appointment.Visible)  
    18 {  
    19 if (!string.IsNullOrEmpty(e.Appointment.Attributes["szColor"]))  
    20 {  
    21 _strBuilder = new StringBuilder();  
    22 _strBuilder.Append("<b class='b1f' style='background-color:" + e.Appointment.Attributes["szColor"].ToString() + "'></b><b class='b2f' style='background-color:" + e.Appointment.Attributes["szColor"].ToString() + "'></b>");  
    23 _strBuilder.Append("<b class='b3f' style='background-color:" + e.Appointment.Attributes["szColor"].ToString() + "'></b><b class='b4f' style='background-color:" + e.Appointment.Attributes["szColor"].ToString() + "'></b>");   
    24 _strBuilder.Append("<div class='contentf' style='height:33px;background-color:" + e.Appointment.Attributes["szColor"].ToString() + "'>");  
    25 _strBuilder.Append("<div class='rsWrap' style='z-index: 14;'><div>");   
    26 _strBuilder.Append(e.Appointment.Subject);  
    27 if (Convert.ToBoolean(e.Appointment.Attributes["bConfirmed"]))  
    28 {  
    29 _strBuilder.Append("<div style='height:10px;width:10px;background-color:Green'>&nbsp;</div>");  
    30 }  
    31 else 
    32 {  
    33 _strBuilder.Append("<div style='height:10px;width:10px;background-color:Red'>&nbsp;</div>");  
    34 }  
    35 _strBuilder.Append("<div class='rsAptResize' style='z-index: 80;background:" + e.Appointment.Attributes["szColor"].ToString() + ";'></div>");  
    36 _strBuilder.Append("</div></div></div>");  
    37  
    38 _strBuilder.Append("<b class='b4f' style='background-color:" + e.Appointment.Attributes["szColor"].ToString() + "'></b><b class='b3f' style='background-color:" + e.Appointment.Attributes["szColor"].ToString() + "'></b>");  
    39 _strBuilder.Append("<b class='b2f' style='background-color:" + e.Appointment.Attributes["szColor"].ToString() + "'></b><b class='b1f' style='background-color:" + e.Appointment.Attributes["szColor"].ToString() + "'></b>");  
    40 }   
    41 PlaceHolder appointmentCell = (PlaceHolder)e.Container.FindControl("PlaceHolder_AppointmentCell");  
    42 appointmentCell.Controls.Add(new LiteralControl(_strBuilder.ToString()));   
    43 }  
    44 }  
    45  
    46  
    47 if any one know give me reply.  
    48 Thx 
  2. SKS
    SKS avatar
    32 posts
    Member since:
    Aug 2009

    Posted 02 Oct 2009 Link to this post

    can the telerik support team reply to this?
    how can this be achieved?
    i need to make the corners of the appointment rounded and make the appointment cell occupy 100% of the space available.

    thanks
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 02 Oct 2009 Link to this post

    If you want to apply different color's to the appointments with the rounded corners, you take the approach they use in their online examples. Here's one of them: http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceavailability/defaultcs.aspx . They pretty much create a different background for each color.

    You just need to edit the scheduler background in photoshop, change the colors and then save each color background. You then just apply the CssClass on the appointment that applies the background color image. Like so, background-image: url('BlueBackground.png'). That's how I do it in my application.

    I hope that helps.
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 05 Oct 2009 Link to this post


    You can also review this help topic:
    http://www.telerik.com/help/aspnet-ajax/schedule_howtoset_different_styles_for_appointments.html
    (you have to scroll down a bit)
    and use the 10 predefined, skin-independent CSS styles that we offer with Q1 2009 SP1.


    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. SKS
    SKS avatar
    32 posts
    Member since:
    Aug 2009

    Posted 05 Oct 2009 Link to this post

    i have seen that link already.
    i dont understand CSS that well enough.
    can you give me the CSS for round corners for borders of appointment?
    thanks
  7. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 06 Oct 2009 Link to this post

    Hello Sudhir,

    Rounded corners are built-in with Q1 2009 SP1 or later, so you don't need to apply any additional css styles. If you use an older version, please upgrade to the current official version - 2009.2.826 and enjoy the rounded corners of the appointments.

    Best wishes,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017