Hello,
I have a RadScheduleView displaying Appointments for Room-s and Speaker-s resources using a TimelineViewDefinition:
Is it possible to create a custom mapping between Room-s and Speaker-s so that for "Room Alfa" and "Room Beta" only two speakers would be displayed "Bob" and "John" (only "Bob" and "John" have access to "Room Alfa" and "Room Beta"); and for "Room Gama" to display all the speakers "Tom", "Bob", "John" (all speakers have access to "Room Gama").
Please see the attached file for more details.
Thank you,
Marius
I have a RadScheduleView displaying Appointments for Room-s and Speaker-s resources using a TimelineViewDefinition:
<
UserControl
x:Class
=
"Scheduler.Views.SchedulerView"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:views
=
"clr-namespace:Scheduler.Views"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"300"
>
<
UserControl.DataContext
>
<
views:SchedulerViewModel
/>
</
UserControl.DataContext
>
<
Grid
>
<
telerik:RadScheduleView
AppointmentsSource
=
"{Binding Appointments}"
ResourceTypesSource
=
"{Binding ResourcesTypes}"
>
<
telerik:RadScheduleView.ViewDefinitions
>
<!--<
telerik:DayViewDefinition
/>
<
telerik:WeekViewDefinition
/>
<
telerik:MonthViewDefinition
/>-->
<
telerik:TimelineViewDefinition
MinTimeRulerExtent
=
"1000"
VisibleDays
=
"2"
MinorTickLength
=
"1h"
MajorTickLength
=
"6h"
GroupTickLength
=
"1d"
/>
</
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:RadScheduleView.GroupDescriptionsSource
>
<
telerik:GroupDescriptionCollection
>
<
telerik:DateGroupDescription
/>
<
telerik:ResourceGroupDescription
ResourceType
=
"Room"
/>
<
telerik:ResourceGroupDescription
ResourceType
=
"Speaker"
/>
</
telerik:GroupDescriptionCollection
>
</
telerik:RadScheduleView.GroupDescriptionsSource
>
<
telerik:RadScheduleView.GroupHeaderContentTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding FormattedName}"
Width
=
"70"
Margin
=
"10"
VerticalAlignment
=
"Center"
/>
</
DataTemplate
>
</
telerik:RadScheduleView.GroupHeaderContentTemplate
>
</
telerik:RadScheduleView
>
</
Grid
>
</
UserControl
>
using
System.Collections.ObjectModel;
using
Telerik.Windows.Controls;
using
Telerik.Windows.Controls.ScheduleView;
namespace
Scheduler.Views
{
public
class
SchedulerViewModel
{
public
SchedulerViewModel()
{
ResourcesTypes = GenerateResourceTypes();
Appointments =
new
ObservableCollection<Appointment>();
}
public
ObservableCollection<Appointment> Appointments {
get
;
set
; }
public
ObservableCollection<ResourceType> ResourcesTypes {
get
;
set
; }
private
ObservableCollection<ResourceType> GenerateResourceTypes()
{
var result =
new
ObservableCollection<ResourceType>();
var roomType =
new
ResourceType(
"Room"
);
var room1 =
new
Resource(
"Room Alfa"
);
var room2 =
new
Resource(
"Room Beta"
);
var room3 =
new
Resource(
"Room Gama"
);
roomType.Resources.Add(room1);
roomType.Resources.Add(room2);
roomType.Resources.Add(room3);
var speakerType =
new
ResourceType(
"Speaker"
);
var speaker1 =
new
Resource(
"Tom"
);
var speaker2 =
new
Resource(
"Bob"
);
var speaker3 =
new
Resource(
"John"
);
speakerType.Resources.Add(speaker1);
speakerType.Resources.Add(speaker2);
speakerType.Resources.Add(speaker3);
result.Add(roomType);
result.Add(speakerType);
return
result;
}
}
}
Is it possible to create a custom mapping between Room-s and Speaker-s so that for "Room Alfa" and "Room Beta" only two speakers would be displayed "Bob" and "John" (only "Bob" and "John" have access to "Room Alfa" and "Room Beta"); and for "Room Gama" to display all the speakers "Tom", "Bob", "John" (all speakers have access to "Room Gama").
Please see the attached file for more details.
Thank you,
Marius