Hello
I've successfully added a resource field called "Assigned" to my radscheduler and I've tried setting the style of the appointments via the resource mapping but it does not work.
I've followed the guides and i've even tried changing it via the vb code and all of my efforts seem to be ignored for some reason.
I was wondering if there is anything i've overlooked or something that would override my settings.
The radscheduler code in my project is as follows;
<
telerik:RadScheduler
ID
=
"RadScheduler1"
runat
=
"server"
DataDescriptionField
=
"Description"
DataEndField
=
"Endtime"
DataKeyField
=
"ID"
DataReminderField
=
"Reminder"
DataSourceID
=
"SqlDataSource1"
DataStartField
=
"Starttime"
DataSubjectField
=
"Subject"
BorderStyle
=
"None"
Culture
=
"en-GB"
FirstDayOfWeek
=
"Monday"
LastDayOfWeek
=
"Friday"
SelectedView
=
"TimelineView"
ShowFooter
=
"False"
ShowHoursColumn
=
"False"
EnableDescriptionField
=
"True"
AllowDelete
=
"False"
BackColor
=
"#EEEEEE"
EnableRecurrenceSupport
=
"False"
ShowViewTabs
=
"False"
StartInsertingInAdvancedForm
=
"True"
RowHeight
=
"30px"
OnAppointmentDataBound
=
"RadScheduler1_SchedulerDataBound"
AllowInsert
=
"False"
Height
=
"340px"
TimelineView-HeaderDateFormat
=
"d"
RowHeaderWidth
=
"46px"
>
<
ExportSettings
>
<
Pdf
PageTopMargin
=
"1in"
PageBottomMargin
=
"1in"
PageLeftMargin
=
"1in"
PageRightMargin
=
"1in"
AllowAdd
=
"True"
AllowModify
=
"True"
PageHeight
=
"297mm"
PageWidth
=
"210mm"
PaperSize
=
"A4"
></
Pdf
>
</
ExportSettings
>
<
ResourceTypes
>
<
telerik:ResourceType
DataSourceID
=
"SqlDataSource1"
ForeignKeyField
=
"UserID"
KeyField
=
"UserID"
Name
=
"Assigned"
TextField
=
"Assigned"
/>
</
ResourceTypes
>
<
ResourceStyles
>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"DW"
ApplyCssClass
=
"CatCheckBox1"
BackColor
=
"#3366FF"
/>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"NR"
ApplyCssClass
=
"rsCategoryBlue"
/>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"JK"
ApplyCssClass
=
"rsCategoryDarkGreen"
/>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"MG"
ApplyCssClass
=
"rsCategoryGreen"
/>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"NSG"
ApplyCssClass
=
"rsCategoryDarkRed"
/>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"AR"
ApplyCssClass
=
"rsCategoryOrange"
/>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"NN"
ApplyCssClass
=
"rsCategoryPink"
/>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"AMK"
ApplyCssClass
=
"rsCategoryRed"
/>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"EN"
ApplyCssClass
=
"rsCategoryViolet"
/>
<
telerik:ResourceStyleMapping
Type
=
"Assigned"
Text
=
"SD"
ApplyCssClass
=
"rsCategoryYellow"
/>
</
ResourceStyles
>
<
Localization
AdvancedNewAppointment
=
"New Schedule"
AdvancedEditAppointment
=
"Edit Schedule"
AdvancedFrom
=
"Received Date"
AdvancedSubjectRequired
=
"Please provide a schedule subject"
AdvancedTo
=
"Promised Date"
ContextMenuAddAppointment
=
"New Schedule"
HeaderAddAppointment
=
"Add Schedule"
HeaderAgendaAppointment
=
"Schedule"
HeaderDay
=
"1 Day"
HeaderWeek
=
"7 Day"
/>
<
TimelineView
HeaderDateFormat
=
"dd-MM-yy"
NumberOfSlots
=
"7"
ShowInsertArea
=
"False"
/>
<
WeekView
UserSelectable
=
"False"
/>
<
DayView
UserSelectable
=
"False"
/>
<
MultiDayView
ReadOnly
=
"True"
ShowHoursColumn
=
"False"
/>
<
MonthView
UserSelectable
=
"False"
VisibleAppointmentsPerDay
=
"3"
/>
<
AgendaView
ReadOnly
=
"True"
ResourceMarkerType
=
"Bar"
/>
<
AppointmentContextMenuSettings
EnableDefault
=
"False"
/>
<
TimeSlotContextMenuSettings
EnableDefault
=
"False"
/>
<
Reminders
Enabled
=
"True"
/>
</
telerik:RadScheduler
>
Thanks
8 Answers, 1 is accepted

I forgot to mention
I've inspected the source of webpage when run in google and none of the cssClass are present on the appointment class elements.
Something is stopping these being added to the page at runtime

I tested the ResourceStyles on my end and everything seems to be working fine. I've attached a small sample page demonstrating the functionality (the page is based on your Scheduler settings). For simplicity I used XML binding in the sample.
Could you confirm that the appointments in question have a resource assigned to them? Can you also confirm whether the sample page works correctly on your end?
Regards,
Bozhidar
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Hello
Thank you for your assistance.
I have tested the supplied page in my project and it works successfully.
My scheduler is using an sql server binding and i can confirm that the field "Assigned" is populated with data for every record.
Here is the full page code;
Dashboard.aspx
<%@ Page Language="VB" AutoEventWireup="True" CodeFile="Dashboard.aspx.vb" Inherits="Scheduler" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI.Gantt" TagPrefix="cc1" %>
<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=9.0.15.324, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<
html
xmlns
=
'http://www.w3.org/1999/xhtml'
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
link
href
=
"../page-specific.css"
rel
=
"stylesheet"
/>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadSkinManager
ID
=
"RadSkinManager1"
runat
=
"server"
Skin
=
"Metro"
ShowChooser
=
"False"
></
telerik:RadSkinManager
>
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
>
</
telerik:RadStyleSheetManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Default"
></
telerik:RadAjaxLoadingPanel
>
<%-- SQLDatasource --%>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:EQOSConnectionString %>" SelectCommand="SELECT [ID], [Subject], [Description], [Starttime], [Endtime], [UserID], [Reminder], [Assigned] FROM [Scheduler] WHERE ([Branch_ID] = @Branch_ID)" OldValuesParameterFormatString="original_{0}" DeleteCommand="DELETE FROM [Scheduler] WHERE [ID] = @original_ID" InsertCommand="INSERT INTO [Scheduler] ([Subject], [Description], [Starttime], [Endtime], [UserID], [Reminder], [Assigned]) VALUES (@Subject, @Description, @Starttime, @Endtime, @UserID, @Reminder, @Assigned)" UpdateCommand="UPDATE [Scheduler] SET [Subject] = @Subject, [Description] = @Description, [Starttime] = @Starttime, [Endtime] = @Endtime, [UserID] = @UserID, [Reminder] = @Reminder, [Assigned] = @Assigned WHERE [ID] = @original_ID">
<
DeleteParameters
>
<
asp:Parameter
Name
=
"original_ID"
Type
=
"Int32"
></
asp:Parameter
>
</
DeleteParameters
>
<
InsertParameters
>
<
asp:Parameter
Name
=
"Subject"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Description"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Starttime"
Type
=
"DateTime"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Endtime"
Type
=
"DateTime"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"UserID"
Type
=
"Int32"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Reminder"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Assigned"
Type
=
"String"
></
asp:Parameter
>
</
InsertParameters
>
<
SelectParameters
>
<
asp:Parameter
DefaultValue
=
"18"
Name
=
"Branch_ID"
Type
=
"Int32"
></
asp:Parameter
>
</
SelectParameters
>
<
UpdateParameters
>
<
asp:Parameter
Name
=
"Subject"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Description"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Starttime"
Type
=
"DateTime"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Endtime"
Type
=
"DateTime"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"UserID"
Type
=
"Int32"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Reminder"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"Assigned"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"original_ID"
Type
=
"Int32"
></
asp:Parameter
>
</
UpdateParameters
>
</
asp:SqlDataSource
>
<%-- ObjectDatasource --%>
<
asp:ObjectDataSource
runat
=
"server"
ID
=
"EQOSObjectDataSource1"
DataObjectTypeName
=
"RM.Data.Objects.menu"
DeleteMethod
=
"Delete"
InsertMethod
=
"Insert"
OldValuesParameterFormatString
=
"original_{0}"
SelectMethod
=
"Select"
TypeName
=
"RM.Data.Objects.menuFactory"
UpdateMethod
=
"Update"
>
<
SelectParameters
>
<
asp:Parameter
Name
=
"dataFieldID"
Type
=
"Int32"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"dataFieldParentID"
Type
=
"Int32"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"text"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"navigateUrl"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"value"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"branch_ID"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"MenuType"
Type
=
"String"
></
asp:Parameter
>
</
SelectParameters
>
</
asp:ObjectDataSource
>
<
div
>
<
br
/>
<
br
/>
</
div
>
<
div
id
=
"eDash"
>
<%-- TAB MENU --%>
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
runat
=
"server"
MultiPageID
=
"RadMultiPage1"
SelectedIndex
=
"0"
Skin
=
"Bootstrap"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Quotation Schedule"
PageViewID
=
"Dash1"
Selected
=
"True"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Workflow"
PageViewID
=
"Dash2"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Report Manager"
PageViewID
=
"Dash3"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
div
id
=
"hrline1"
>
<
hr
style
=
"background: #E5E5E5; border: 0; height: 0.5px"
/>
</
div
>
<%-- MULTIPAGE --%>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
SelectedIndex
=
"0"
Height
=
"100%"
>
<
telerik:RadPageView
runat
=
"server"
PageViewID
=
"Dash1"
>
<%-- TAB1 CONTENT - SCHEDULER --%>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
HorizontalAlign
=
"NotSet"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
RenderMode
=
"Inline"
>
<
div
class
=
"eScheduler"
>
<%-- SCHEDULER - TOGGLE BUTTONS --%>
<
div
id
=
"esched-togbtns"
>
<
telerik:RadButton
ID
=
"BtnCheckBox1"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox1"
ButtonType
=
"LinkButton"
Checked
=
"true"
OnClick
=
"btnToggle_Click"
ToolTip
=
"David Wilson"
EnableBrowserButtonStyle
=
"False"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"DW"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"DW"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"BtnCheckBox2"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox2"
ButtonType
=
"LinkButton"
Checked
=
"true"
OnClick
=
"btnToggle_Click"
ToolTip
=
"Nick Robinson"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"NR"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"NR"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"BtnCheckBox3"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox3"
ButtonType
=
"LinkButton"
Checked
=
"true"
OnClick
=
"btnToggle_Click"
ToolTip
=
"Julia Korolova"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"JK"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"JK"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"BtnCheckBox4"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox4"
ButtonType
=
"LinkButton"
Checked
=
"true"
OnClick
=
"btnToggle_Click"
ToolTip
=
"Martin Goodall"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"MG"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"MG"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"BtnCheckBox5"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox5"
ButtonType
=
"LinkButton"
Checked
=
"True"
OnClick
=
"btnToggle_Click"
ToolTip
=
"Natalya Shegay"
style
=
"position: relative;"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"NSG"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"NSG"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"BtnCheckBox6"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox6"
ButtonType
=
"LinkButton"
Checked
=
"true"
OnClick
=
"btnToggle_Click"
ToolTip
=
"Natalya Shegay"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"AR"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"AR"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"BtnCheckBox7"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox7"
ButtonType
=
"LinkButton"
Checked
=
"true"
OnClick
=
"btnToggle_Click"
ToolTip
=
"Natalya Shegay"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"NN"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"NN"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"BtnCheckBox8"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox8"
ButtonType
=
"LinkButton"
Checked
=
"true"
OnClick
=
"btnToggle_Click"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"AMK"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"AMK"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"BtnCheckBox9"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox9"
ButtonType
=
"LinkButton"
Checked
=
"true"
OnClick
=
"btnToggle_Click"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"EN"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"EN"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"BtnCheckBox10"
runat
=
"server"
ToggleType
=
"CheckBox"
CssClass
=
"BtnCheckBox10"
ButtonType
=
"LinkButton"
Checked
=
"true"
OnClick
=
"btnToggle_Click"
>
<
ToggleStates
>
<
telerik:RadButtonToggleState
Text
=
"SD"
Selected
=
"true"
PrimaryIconCssClass
=
"rbToggleCheckboxChecked"
/>
<
telerik:RadButtonToggleState
Text
=
"SD"
PrimaryIconCssClass
=
"rbToggleCheckbox"
/>
</
ToggleStates
>
</
telerik:RadButton
>
</
div
>
<%-- SCHEDULER - RADSCHEDULER --%>
<
telerik:RadScheduler
ID
=
"RadScheduler1"
runat
=
"server"
AppointmentStyleMode
=
"Default"
DataDescriptionField
=
"Description"
DataEndField
=
"Endtime"
DataKeyField
=
"ID"
DataReminderField
=
"Reminder"
DataSourceID
=
"SqlDataSource1"
DataStartField
=
"Starttime"
DataSubjectField
=
"Subject"
BorderStyle
=
"None"
Culture
=
"en-GB"
FirstDayOfWeek
=
"Monday"
LastDayOfWeek
=
"Friday"
SelectedView
=
"TimelineView"
ShowFooter
=
"False"
ShowHoursColumn
=
"False"
EnableDescriptionField
=
"True"
AllowDelete
=
"False"
BackColor
=
"#EEEEEE"
EnableRecurrenceSupport
=
"False"
ShowViewTabs
=
"False"
StartInsertingInAdvancedForm
=
"True"
RowHeight
=
"30px"
OnAppointmentDataBound
=
"RadScheduler1_SchedulerDataBound"
AllowInsert
=
"False"
Height
=
"340px"
TimelineView-HeaderDateFormat
=
"d"
RowHeaderWidth
=
"46px"
>
<
Localization
AdvancedNewAppointment
=
"New Schedule"
AdvancedEditAppointment
=
"Edit Schedule"
AdvancedFrom
=
"Received Date"
AdvancedSubjectRequired
=
"Please provide a schedule subject"
AdvancedTo
=
"Promised Date"
ContextMenuAddAppointment
=
"New Schedule"
HeaderAddAppointment
=
"Add Schedule"
HeaderAgendaAppointment
=
"Schedule"
HeaderDay
=
"1 Day"
HeaderWeek
=
"7 Day"
/>
<
TimelineView
HeaderDateFormat
=
"dd-MM-yy"
NumberOfSlots
=
"7"
ShowInsertArea
=
"False"
/>
<
WeekView
UserSelectable
=
"False"
/>
<
DayView
UserSelectable
=
"False"
/>
<
MultiDayView
ReadOnly
=
"True"
ShowHoursColumn
=
"False"
/>
<
MonthView
UserSelectable
=
"False"
VisibleAppointmentsPerDay
=
"3"
/>
<
AgendaView
ReadOnly
=
"True"
ResourceMarkerType
=
"Bar"
/>
<
AppointmentContextMenuSettings
EnableDefault
=
"False"
/>
<
TimeSlotContextMenuSettings
EnableDefault
=
"False"
/>
<
Reminders
Enabled
=
"True"
/>
<
ResourceTypes
>
<
telerik:ResourceType
DataSourceID
=
"SqlDataSource1"
ForeignKeyField
=
"UserID"
KeyField
=
"UserID"
Name
=
"User"
TextField
=
"Assigned"
></
telerik:ResourceType
>
</
ResourceTypes
>
<
ResourceStyles
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"DW"
ApplyCssClass
=
"rsCategoryBlue"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"NR"
ApplyCssClass
=
"rsCategoryBlue"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"JK"
ApplyCssClass
=
"rsCategoryDarkGreen"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"MG"
ApplyCssClass
=
"rsCategoryGreen"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"NSG"
ApplyCssClass
=
"rsCategoryDarkRed"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"AR"
ApplyCssClass
=
"rsCategoryOrange"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"NN"
ApplyCssClass
=
"rsCategoryPink"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"AMK"
ApplyCssClass
=
"rsCategoryRed"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"EN"
ApplyCssClass
=
"rsCategoryViolet"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"SD"
ApplyCssClass
=
"rsCategoryYellow"
></
telerik:ResourceStyleMapping
>
</
ResourceStyles
>
</
telerik:RadScheduler
>
</
div
>
</
telerik:RadAjaxPanel
>
<%-- TAB1 CONTENT - CHARTS --%>
<
div
id
=
"tab1-chartcontainer"
>
<
div
class
=
"charts"
>
<%-- CHARTS - CHART 1 --%>
<
div
class
=
"col-chart1 col-centered"
>
<
telerik:RadHtmlChart
ID
=
"RadHtmlChart1"
runat
=
"server"
Font-Strikeout
=
"False"
DataSourceID
=
"Chart1Data"
DataLabelsField
=
"FieldName"
>
<
PlotArea
>
<
XAxis
DataLabelsField
=
"FieldName"
></
XAxis
>
<
Series
>
<
telerik:PieSeries
StartAngle
=
"90"
Name
=
"PieSeries1"
DataFieldY
=
"FieldValue"
NameField
=
"FieldName"
ExplodeField
=
"Exploded"
ColorField
=
"Colour"
>
<
LabelsAppearance
Position
=
"OutsideEnd"
></
LabelsAppearance
>
<
TooltipsAppearance
Color
=
"White"
>
<
ClientTemplate
>
#=dataItem.FieldName#<
br
/>QTY: #=dataItem.FieldValue#
</
ClientTemplate
>
</
TooltipsAppearance
>
</
telerik:PieSeries
>
</
Series
>
</
PlotArea
>
</
telerik:RadHtmlChart
>
<
asp:SqlDataSource
runat
=
"server"
ID
=
"Chart1Data"
ConnectionString='<%$ ConnectionStrings:EQOSConnectionString %>' SelectCommand="SELECT [FieldName], [FieldValue], [Exploded], [Colour] FROM [charts_datacount] WHERE (([Branch_ID] = @Branch_ID) AND ([DataController] = @DataController) AND ([Enabled] = @Enabled))">
<
SelectParameters
>
<
asp:Parameter
DefaultValue
=
"18"
Name
=
"Branch_ID"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
DefaultValue
=
"status"
Name
=
"DataController"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
DefaultValue
=
"True"
Name
=
"Enabled"
Type
=
"Boolean"
></
asp:Parameter
>
</
SelectParameters
>
</
asp:SqlDataSource
>
</
div
>
<%-- CHARTS - CHART 2 --%>
<
div
class
=
"col-chart2 col-centered"
>
<
telerik:RadHtmlChart
ID
=
"RadHtmlChart2"
runat
=
"server"
DataSourceID
=
"Chart2Data"
>
<
Legend
>
<
Appearance
Position
=
"Bottom"
BackgroundColor
=
"Transparent"
></
Appearance
>
</
Legend
>
<
PlotArea
>
<
XAxis
DataLabelsField
=
"USER_sxeid"
>
</
XAxis
>
<
Series
>
<
telerik:BarSeries
Name
=
"Value"
DataFieldY
=
"QuoteValue"
ZIndex
=
"500"
Stacked
=
"True"
>
<
LabelsAppearance
Position
=
"InsideEnd"
Visible
=
"False"
></
LabelsAppearance
>
<
TooltipsAppearance
Color
=
"White"
>
<
ClientTemplate
>
Value: #=dataItem.QuoteValue#<
br
/>#=dataItem.fullname#
</
ClientTemplate
>
</
TooltipsAppearance
>
</
telerik:BarSeries
>
<
telerik:BarSeries
Stacked
=
"True"
Name
=
"Profit"
DataFieldY
=
"QuoteProfitValue"
ZIndex
=
"9999"
>
<
LabelsAppearance
Position
=
"OutsideEnd"
Visible
=
"False"
></
LabelsAppearance
>
<
TooltipsAppearance
Color
=
"White"
>
<
ClientTemplate
>
Profit: #=dataItem.QuoteProfitValue#<
br
/>#=dataItem.fullname#
</
ClientTemplate
>
</
TooltipsAppearance
>
</
telerik:BarSeries
>
</
Series
>
</
PlotArea
>
<
Legend
>
<
Appearance
BackgroundColor
=
"Transparent"
Position
=
"Bottom"
></
Appearance
>
</
Legend
>
</
telerik:RadHtmlChart
>
<
asp:SqlDataSource
runat
=
"server"
ID
=
"Chart2Data"
ConnectionString='<%$ ConnectionStrings:EQOSConnectionString %>' SelectCommand="SELECT [UserName], [USER_sxeid],[QuoteValue],[fullname], [QuoteProfitValue] FROM [Users] WHERE (([Branch_ID] = @Branch_ID) AND ([QuoteValue] IS NOT NULL) AND ([QuoteValue] > @QuoteValue) AND ([ChartOptQuoteValue] = @ChartOptQuoteValue))">
<
SelectParameters
>
<
asp:Parameter
DefaultValue
=
"1"
Name
=
"Branch_ID"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
DefaultValue
=
"0"
Name
=
"QuoteValue"
Type
=
"Decimal"
></
asp:Parameter
>
<
asp:Parameter
DefaultValue
=
"True"
Name
=
"ChartOptQuoteValue"
Type
=
"Boolean"
></
asp:Parameter
>
</
SelectParameters
>
</
asp:SqlDataSource
>
</
div
>
<%-- CHARTS - CHART 3 --%>
<
div
class
=
"col-chart3 col-centered"
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
CellSpacing
=
"-1"
DataSourceID
=
"Chart3Data"
GridLines
=
"Both"
GroupPanelPosition
=
"Top"
>
<
MasterTableView
DataSourceID
=
"Chart3Data"
AutoGenerateColumns
=
"False"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Quote_Id"
HeaderText
=
"Quote_Id"
SortExpression
=
"Quote_Id"
UniqueName
=
"Quote_Id"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter Quote_Id column"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Q_enquiry_ref"
HeaderText
=
"Q_enquiry_ref"
SortExpression
=
"Q_enquiry_ref"
UniqueName
=
"Q_enquiry_ref"
FilterControlAltText
=
"Filter Q_enquiry_ref column"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CUST_name"
HeaderText
=
"CUST_name"
SortExpression
=
"CUST_name"
UniqueName
=
"CUST_name"
FilterControlAltText
=
"Filter CUST_name column"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Q_date_requested"
HeaderText
=
"Q_date_requested"
SortExpression
=
"Q_date_requested"
UniqueName
=
"Q_date_requested"
DataType
=
"System.DateTime"
FilterControlAltText
=
"Filter Q_date_requested column"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Status_ID"
HeaderText
=
"Status_ID"
SortExpression
=
"Status_ID"
UniqueName
=
"Status_ID"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter Status_ID column"
></
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:ObjectDataSource
runat
=
"server"
ID
=
"Chart3Data"
OldValuesParameterFormatString
=
"original_{0}"
SelectMethod
=
"Select"
TypeName
=
"RM.Data.Objects.quotes_overdueFactory"
>
<
SelectParameters
>
<
asp:Parameter
Name
=
"quote_Id"
Type
=
"Int32"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"q_enquiry_ref"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"cUST_name"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"q_date_requested"
Type
=
"DateTime"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"status_ID"
Type
=
"Int32"
></
asp:Parameter
>
</
SelectParameters
>
</
asp:ObjectDataSource
>
</
div
>
</
div
>
</
div
>
</
telerik:RadPageView
>
<
telerik:RadPageView
runat
=
"server"
PageViewID
=
"Dash2"
>
<
p
>Dash2</
p
>
</
telerik:RadPageView
>
<
telerik:RadPageView
runat
=
"server"
PageViewID
=
"Dash3"
>
<
br
/>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel2"
runat
=
"server"
>
<
telerik:RadPageLayout
ID
=
"RadPageLayout1"
runat
=
"server"
GridType
=
"Fluid"
ShowGrid
=
"False"
Width
=
"100%"
EnableEmbeddedBaseStylesheet
=
"True"
EnableAjaxSkinRendering
=
"True"
EnableEmbeddedScripts
=
"False"
EnableEmbeddedSkins
=
"False"
HtmlTag
=
"Div"
RegisterWithScriptManager
=
"True"
RenderMode
=
"Classic"
>
<
Rows
>
<
telerik:LayoutRow
>
<
Columns
>
<
telerik:LayoutColumn
Span
=
"2"
>
<
div
id
=
"ReportMenu"
>
<
telerik:RadMenu
ID
=
"RadMenu1"
runat
=
"server"
Flow
=
"Vertical"
Width
=
"200px"
DataSourceID
=
"EQOSObjectDataSource1"
DataFieldID
=
"DataFieldID"
DataFieldParentID
=
"DataFieldParentID"
DataNavigateUrlField
=
"NavigateUrl"
DataValueField
=
"Value"
DataTextField
=
"Text"
AppendDataBoundItems
=
"False"
ClickToOpen
=
"False"
>
</
telerik:RadMenu
>
</
div
>
</
telerik:LayoutColumn
>
<
telerik:LayoutColumn
Span
=
"10"
>
<
div
id
=
"ReportWindow"
>
<
telerik:ReportViewer
ID
=
"ReportViewer1"
runat
=
"server"
Width
=
"100%"
Height
=
"780px"
BorderColor
=
"#CCCCCC"
BorderStyle
=
"Solid"
BorderWidth
=
"1px"
ShowRefreshButton
=
"True"
>
<
urireportsource
uri
=
"branch-specific/exports/reports/placeholder.trdx"
></
urireportsource
>
</
telerik:ReportViewer
>
</
div
>
</
telerik:LayoutColumn
>
</
Columns
>
</
telerik:LayoutRow
>
</
Rows
>
</
telerik:RadPageLayout
>
</
telerik:RadAjaxPanel
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
</
div
>
</
form
>
</
body
>
</
html
>
Dashboard.aspx.vb
Imports
System
Imports
System.Web.UI.WebControls
Imports
Telerik.Web.UI
Imports
Telerik.Reporting
Imports
System.Drawing
Partial
Public
Class
Scheduler
Inherits
System.Web.UI.Page
Protected
Sub
RadScheduler1_SchedulerDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.SchedulerEventArgs)
e.Appointment.Visible =
False
FilterAppointment(e.Appointment, BtnCheckBox1, 11)
FilterAppointment(e.Appointment, BtnCheckBox2, 12)
FilterAppointment(e.Appointment, BtnCheckBox3, 15)
FilterAppointment(e.Appointment, BtnCheckBox4, 16)
FilterAppointment(e.Appointment, BtnCheckBox5, 17)
FilterAppointment(e.Appointment, BtnCheckBox6, 19)
FilterAppointment(e.Appointment, BtnCheckBox7, 20)
FilterAppointment(e.Appointment, BtnCheckBox8, 21)
FilterAppointment(e.Appointment, BtnCheckBox9, 22)
FilterAppointment(e.Appointment, BtnCheckBox10, 23)
RadScheduler1.ResourceTypes.FindByName(
"User"
).AllowMultipleValues =
False
End
Sub
Private
Shared
Sub
FilterAppointment(appointment
As
Appointment, checkBox
As
ICheckBoxControl, resourceId
As
Integer
)
If
appointment.Resources.GetResource(
"User"
, resourceId) IsNot
Nothing
AndAlso
checkBox.Checked
Then
appointment.Visible =
True
End
If
End
Sub
Protected
Sub
btnToggle_Click(sender
As
Object
, e
As
EventArgs)
RadScheduler1.Rebind()
End
Sub
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
EventArgs)
Handles
Me
.Load
AddHandler
RadMenu1.ItemClick,
AddressOf
menu_ItemClick
End
Sub
Protected
Sub
RadMenu1_ItemDataBound(
ByVal
sender
As
Object
, _
ByVal
e
As
Telerik.Web.UI.RadMenuEventArgs)
Handles
RadMenu1.ItemDataBound
e.Item.CssClass =
CStr
(DataBinder.Eval(e.Item.DataItem,
"MenuType"
))
End
Sub
Protected
Sub
menu_ItemClick(
ByVal
sender
As
Object
,
ByVal
e
As
RadMenuEventArgs)
If
e.Item.CssClass =
"1"
Then
Dim
uriReportSource =
New
UriReportSource()
'uriReportSource.Uri = "branch-specific/exports/reports/demo2.trdx"
uriReportSource.Uri = (e.Item.Value).ToString
ReportViewer1.ReportSource = uriReportSource
ReportViewer1.RefreshReport()
End
If
End
Sub
End
Class
Sample SQL Table Data
See attached "sample data.jpg"
Thanks
I noticed that you use the same datasource for both appointment and resources, which is the problem. In the ResourceType declaration you have to point to a table which contains the definition of all resources. For instance the table for users will look something like this:
CREATE
TABLE
[dbo].[Users] (
[ID]
INT
NOT
NULL
,
[UserName] NVARCHAR (255)
NOT
NULL
,
CONSTRAINT
[PK_Users]
PRIMARY
KEY
CLUSTERED ([ID]
ASC
)
);
And in this table you will have records with IDs "DW", "JK" etc.
Hope this was helpful.
Regards,
Bozhidar
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Hello
thanks for your reply.
I have updated my code to include a resource table as suggested above. Here is my code;
<
telerik:RadScheduler
ID
=
"RadScheduler1"
runat
=
"server"
DataDescriptionField
=
"Description"
DataEndField
=
"Endtime"
DataKeyField
=
"ID"
DataReminderField
=
"Reminder"
DataSourceID
=
"SchedulerDataSource"
DataStartField
=
"Starttime"
DataSubjectField
=
"Subject"
BorderStyle
=
"None"
Culture
=
"en-GB"
FirstDayOfWeek
=
"Monday"
LastDayOfWeek
=
"Friday"
SelectedView
=
"TimelineView"
ShowFooter
=
"False"
ShowHoursColumn
=
"False"
EnableDescriptionField
=
"True"
AllowDelete
=
"False"
BackColor
=
"#EEEEEE"
EnableRecurrenceSupport
=
"False"
ShowViewTabs
=
"False"
StartInsertingInAdvancedForm
=
"True"
RowHeight
=
"30px"
OnAppointmentDataBound
=
"RadScheduler1_SchedulerDataBound"
AllowInsert
=
"False"
Height
=
"340px"
TimelineView-HeaderDateFormat
=
"d"
RowHeaderWidth
=
"46px"
>
<
Localization
AdvancedNewAppointment
=
"New Schedule"
AdvancedEditAppointment
=
"Edit Schedule"
AdvancedFrom
=
"Received Date"
AdvancedSubjectRequired
=
"Please provide a schedule subject"
AdvancedTo
=
"Promised Date"
ContextMenuAddAppointment
=
"New Schedule"
HeaderAddAppointment
=
"Add Schedule"
HeaderAgendaAppointment
=
"Schedule"
HeaderDay
=
"1 Day"
HeaderWeek
=
"7 Day"
/>
<
TimelineView
HeaderDateFormat
=
"dd-MM-yy"
NumberOfSlots
=
"7"
ShowInsertArea
=
"False"
/>
<
WeekView
UserSelectable
=
"False"
/>
<
DayView
UserSelectable
=
"False"
/>
<
MultiDayView
ReadOnly
=
"True"
ShowHoursColumn
=
"False"
/>
<
MonthView
UserSelectable
=
"False"
VisibleAppointmentsPerDay
=
"3"
/>
<
AgendaView
ReadOnly
=
"True"
ResourceMarkerType
=
"Bar"
/>
<
AppointmentContextMenuSettings
EnableDefault
=
"False"
/>
<
TimeSlotContextMenuSettings
EnableDefault
=
"False"
/>
<
Reminders
Enabled
=
"True"
/>
<
ResourceTypes
>
<
telerik:ResourceType
DataSourceID
=
"UserResourceData"
ForeignKeyField
=
"UserID"
KeyField
=
"UserID"
Name
=
"User"
TextField
=
"USER_sxeid"
></
telerik:ResourceType
>
</
ResourceTypes
>
<
ResourceStyles
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"DW"
ApplyCssClass
=
"rsCategoryDarkBlue"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"NR"
ApplyCssClass
=
"rsCategoryBlue"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"JK"
ApplyCssClass
=
"rsCategoryDarkGreen"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"MG"
ApplyCssClass
=
"rsCategoryGreen"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"NSG"
ApplyCssClass
=
"rsCategoryDarkRed"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"AR"
ApplyCssClass
=
"rsCategoryOrange"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"NN"
ApplyCssClass
=
"rsCategoryPink"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"AMK"
ApplyCssClass
=
"rsCategoryRed"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"EN"
ApplyCssClass
=
"rsCategoryViolet"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"SD"
ApplyCssClass
=
"rsCategoryYellow"
></
telerik:ResourceStyleMapping
>
</
ResourceStyles
>
</
telerik:RadScheduler
>
<%-- SchedulerDataSource --%>
<
asp:SqlDataSource
ID
=
"SchedulerDataSource"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:EQOSConnectionString %>" SelectCommand="SELECT [ID], [Subject], [Description], [Starttime], [Endtime], [UserID], [Reminder] FROM [Scheduler] WHERE ([Branch_ID] = @Branch_ID)" OldValuesParameterFormatString="original_{0}">
<
SelectParameters
>
<
asp:Parameter
DefaultValue
=
"18"
Name
=
"Branch_ID"
Type
=
"Int32"
></
asp:Parameter
>
</
SelectParameters
>
</
asp:SqlDataSource
>
<%-- UserResourceData --%>
<
asp:SqlDataSource
ID
=
"UserResourceData"
runat
=
"server"
ConnectionString='<%$ ConnectionStrings:EQOSConnectionString %>' SelectCommand="SELECT [UserID], [USER_sxeid] FROM [users_18]"></
asp:SqlDataSource
>
I still cannot get this to work.
I have again rechecked the code at runtime and the css is not being applied. I've checked the resource field from the advanced form and it is picking up the records form the resource table correctly.
Have i missed something?
Thanks
After investigating the issue and the project you've sent in the related ticket we found out the reason for the issue. I'm posting it here as well, so that other people with similar problems may see it as well.
It turns out that the problem is that your database returns the resource as "DW " rather than "DW" (8 trailing spaces after the letters). That is why it's not being matched to the ResourceStyleMapping, since it's declared without the spaces there.
You can quickly fix this by setthing the following:
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"DW "
ApplyCssClass
=
"rsCategoryDarkBlue"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"NR "
ApplyCssClass
=
"rsCategoryBlue"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"JK "
ApplyCssClass
=
"rsCategoryDarkGreen"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"MG "
ApplyCssClass
=
"rsCategoryGreen"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"NSG "
ApplyCssClass
=
"rsCategoryDarkRed"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"AR "
ApplyCssClass
=
"rsCategoryOrange"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"NN "
ApplyCssClass
=
"rsCategoryPink"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"AMK "
ApplyCssClass
=
"rsCategoryRed"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"EN "
ApplyCssClass
=
"rsCategoryViolet"
></
telerik:ResourceStyleMapping
>
<
telerik:ResourceStyleMapping
Type
=
"User"
Text
=
"SD "
ApplyCssClass
=
"rsCategoryYellow"
></
telerik:ResourceStyleMapping
>
You can either use this approach, or change your database so that it doesn't contain empty spaces.
Regards,
Bozhidar
Telerik
See What's Next in App Development. Register for TelerikNEXT.
