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

MinAppointmentHeight for different appointments

5 Answers 153 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Eloy
Top achievements
Rank 1
Eloy asked on 27 Aug 2012, 03:09 PM
Hello!

How could I have two MinAppointmentHeight in the same ScheduleView? In other words, how could I have appointments with different heights?

This is how it should look like:
http://oi47.tinypic.com/2vmtxlv.jpg 

Thank you,

Eloy.


5 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 30 Aug 2012, 07:47 AM
Hello Eloy,

In order to make multiple appointments with different heights you will need to create a custom AppointmentStyleSelector that inherits OrientedAppointmentItemStyleSelector and than create different Styles for each of the different appointments you want to have. You can find an example how to achieve this in our online demos.

Note that you will need to set the MinAppointmentHeight property of RadScheduleView to a value greater than the greatest height of your custom appointment styles.

The next code snippet represents a sample custom appointment style:

<Style x:Key="height200Style" TargetType="scheduleView:AppointmentItem"
        BasedOn="{StaticResource AppointmentItemVerticalStyleBase}">
    <Setter Property="Height" Value="200"/>
    <Setter Property="Margin" Value="8 -200 8 2"/>
</Style>


Kind regards,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Michael
Top achievements
Rank 1
answered on 30 Aug 2012, 09:49 AM
Thank you Vladi, now I have appointments with different heights :)

Appointments Type 1: Height = 20
Appointments Type 2: Height = 40

But when set the MinAppointmentHeight property on RadScheduleView to the minimum appointment height, appointments of type 2 appear with height 20.

And when I set the property MinAppointmentHeight to 40 the slots are divided into equal parts of height 40 so that appears an empty space in them:
http://i46.tinypic.com/ekgh9t.png 

How could I solve it to get this?
http://i49.tinypic.com/14pipt.png 


Eloy.

0
Vladi
Telerik team
answered on 30 Aug 2012, 03:11 PM
Hi Eloy,

The empty space that is being shown when you declare the MinAppointmentHeight is caused by the way  appointments are being rendered in the control. The value from the MinAppointmentHeight is reserved for the appointment rather than the lower value from the custom style.

I am afraid that this exact scenario you are trying to implement cannot be achieved with the current version of RadScheduleView.

Sorry for any inconvenience that this may be causing.

Greetings,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Daniel
Top achievements
Rank 1
answered on 24 Dec 2014, 08:38 AM
Hi,

I'm dealing with this problem too. Any change we can get different resource group header heights with different appointments height with no empty spaces in a Timeline view with the current version ?
0
Nasko
Telerik team
answered on 29 Dec 2014, 05:42 PM
Hello Daniel,

With the current version of Telerik controls there isn't any build in functionality that allows different heights to be set for each GroupHeader of RadScheduleView. Also, you could not set different heights for the appointments for the TimelineViewDefinition. That functionality is only available for the MonthViewDefinition and it was presented with Q2 2014 release version of the controls. You could find more information about it on the following link:
http://docs.telerik.com/devtools/wpf/controls/radscheduleview/howto/set-custom-appointment-height

Hopes the provide information will help you.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ScheduleView
Asked by
Eloy
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Michael
Top achievements
Rank 1
Daniel
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or