This is a migrated thread and some comments may be shown as answers.

Appointment Template problem.

2 Answers 55 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 17 Aug 2012, 01:00 PM
I have the following code in my Appointment Template.
<AppointmentTemplate>
<div><h1><%# Eval("Subject") %></h1><br /></div>
<hr />
<div><h2><%# Eval("Attributes['Rooms']") %></h2></div>
<div><h3><%# Eval("Attributes['StaffNames']") %></h3></div>
<div><h4><%# Eval("Start","{0:t}") %> - <%# Eval("End","{0:t}") %></h4></div>
</AppointmentTemplate>

This then creates the appointment like the image below.

What I need is for the hr line to move up a bit.

I have tried in the css stylesheet using margins and padding and nothing works
.hr
{
margin: 5px 0 !important;
border-width: 1px 0 0 0;
height: 1px;
}

When i remove the <br /> it pushes the line up but it still does not work with margins or padding.

Any suggestions.

Cheers

John M









2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 21 Aug 2012, 12:11 PM
Hello John,

Please, try the following:
<AppointmentTemplate>
         <div style="line-height:11px">
             <h1>
                 Subject</h1>
             <br />
         </div>
         <hr />
         <div>
             <h2>
                 Rooms</h2>
         </div>
         <div>
             <h3>
                 StaffNames</h3>
         </div>
         <div>
             <h4>
                 9:30 - 10:30</h4>
         </div>
     </AppointmentTemplate>


Regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Sean
Top achievements
Rank 2
answered on 12 Dec 2013, 10:43 PM
Hello John (or anyone using this resource,)

Ensure that AppointmentStyleMode is not set to "Default" in your RadScheduler code. Set it to "Simple" or "Auto" in order to customize the appointment template. (Of course, be ready to re-style the entire thing, yourself.)

Cheers,
Sean
Tags
Scheduler
Asked by
John
Top achievements
Rank 1
Answers by
Peter
Telerik team
Sean
Top achievements
Rank 2
Share this question
or