Issue in border width in Pixel/Point in RadScheduler

5 posts, 0 answers
  1. Jiten
    Jiten avatar
    57 posts
    Member since:
    Sep 2012

    Posted 25 Sep 2012 Link to this post

    Hello,

    I have problem in border width in RadScheduler. I set the color as well as width below in AppointmentDataBound event:

    e.Appointment.BorderColor = System.Drawing.Color.FromName(e.Appointment.Attributes["VisitTypeColorName"].ToString());
                    e.Appointment.BorderStyle = BorderStyle.Solid;
                    e.Appointment.BorderWidth = Unit.Pixel(10);

    But appointment border width is still small. And this e.Appointment.Attributes["VisitTypeColorName"].ToString() is come from the database. It get the color from the database.
    I am attach the file and mark the appointment in image which border color show.

    Please help me as soon as possible.
    Thanks.

    Jiten Mutum
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Sep 2012 Link to this post

    Hi Jiten,

    I tried to replicate the problem in telerik version 2012, 2, 607, 40 and it worked as expected at my end. Following is the sample code that I tried and attached is the screenshot.

    C#:
    protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
        {
            e.Appointment.BorderColor = System.Drawing.Color.Red;
            e.Appointment.BorderStyle = BorderStyle.Solid;
            e.Appointment.BorderWidth = Unit.Pixel(10);
        }

    Please elaborate your scenario if it doesn't helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jiten
    Jiten avatar
    57 posts
    Member since:
    Sep 2012

    Posted 26 Sep 2012 Link to this post

    Hello Princy,
    This is the code what i doing in the AppointmentDataBound. I want to know that any related event or property
    which could be problem in displaying the border width color.
     protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
        {
                        e.Appointment.BackColor = System.Drawing.Color.Yellow;
                        e.Appointment.BorderColor = System.Drawing.Color.Red;
                               
                        e.Appointment.BorderStyle = BorderStyle.Solid;
                        e.Appointment.BorderWidth = Unit.Pixel(10);
                             
    }
    And another properties use in the radScheduler are
    <telerik:RadScheduler AllowInsert="false" HoursPanelTimeFormat="hh:mm tt" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
                                                            OnAppointmentCreated="RadScheduler1_AppointmentCreated" runat="server" ID="RadScheduler1"
                                                            Skin="Windows7" Width="100%" Height="100%" CustomAttributeNames="StatusId,ColorName,StatusColor,RegistrationId,DoesPatientOweMoney,ValidPaymentCaseId,TooTipText,DoctorId,Type,EligibilityChecked,AppointmentColor,AppointmentName"
                                                            ShowFooter="true" SelectedDate="2010-03-18" OnClientAppointmentClick="OnClientAppointmentClick"
                                                            EnableDescriptionField="true" ShowNavigationPane="false" OnAppointmentDelete="RadScheduler1_AppointmentDelete"
                                                            OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" DataSubjectField="Subject"
                                                            DataStartField="FromTime" DataEndField="ToTime" ShowAllDayRow="false" OnClientTimeSlotClick="OnClientTimeSlotClick"
                                                            AllowEdit="False" DataKeyField="AppointmentId" DataDescriptionField="StatusColor"
                                                            OnTimeSlotContextMenuItemClicked="RadScheduler1_TimeSlotContextMenuItemClicked"
                                                            AllowDelete="false" OnAppointmentContextMenuItemClicked="RadScheduler1_AppointmentContextMenuItemClicked"
                                                            OnNavigationCommand="RadScheduler1_NavigationCommand" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated"
                                                            OnClientAppointmentContextMenu="OnClientAppointmentContextMenu" AppointmentStyleMode="Default">
                                                            <AppointmentContextMenuSettings EnableDefault="true" />
                                                            <AdvancedForm Modal="true" />
                                                            <TimelineView UserSelectable="false" />
                                                            <AppointmentTemplate>
                                                               <%# Eval("Subject")%>
                                                                <asp:Label runat="server" ID="Teacher" />
                                                                <asp:Label runat="server" ID="Students" />
                                                            </AppointmentTemplate>

    Still small in border width. What is the exact problem. If you saying ok in your reply to me then control property or event could be the  problem.
    So please help me soon as possible.

    Thanks

    Jiten Mutum
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Sep 2012 Link to this post

    Hi Jiten,

    I could replicate the problem when the AppointmentStyleMode property of RadScheduler is set to Default. Please try setting the AppointmentStyleMode property of RadScheduler to Simple or Auto to set the BorderWidth for the Appointment.

    Hope this helps.

    Regards,
    Princy.
  6. Sean
    Sean avatar
    2 posts
    Member since:
    Dec 2013

    Posted 11 Dec 2013 Link to this post

    Princy,

    This helped me out, as well.

    Thank you,
    Sean
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017