first I have my RadScheduler in a page calling a webservice using a custom provider (MyDbSchedulerProvider)
I am adding dynamic category coloring to my appointments.
I was able to add them manually to the front code as
<ResourceStyles> <telerik:ResourceStyleMapping Type="Calendar" Key="cat1" Text="category 1" BackColor="#DEB887" BorderColor="#000000" /> <telerik:ResourceStyleMapping Type="Calendar" Key="cat2" Text="category 2" BackColor="#000000" BorderColor="#FFFFFF" /></ResourceStyles>then in my provider code I tried a few things but only got this to work so far
Dim oResource As ResourceSelect Case (i Mod 4) Case 0 'apt.CssClass = "rsCategoryAqua" 'apt.BackColor = Drawing.Color.Aqua 'apt.ForeColor = Drawing.Color.Black oResource = New Resource("Calendar", "cat1", "category 1") apt.Resources.Add(oResource) Case 1 'apt.CssClass = "rsCategoryBeige" 'apt.BackColor = Drawing.Color.Beige 'apt.ForeColor = Drawing.Color.Black oResource = New Resource("Calendar", "cat2", "category 2") apt.Resources.Add(oResource)End Selectok I tried to remove the code front tags and add instead in the page behind
RadScheduler1.ResourceStyles.Add(New ResourceStyleMapping("Calendar", "cat3", "category 3"))RadScheduler1.ResourceStyles.Add(New ResourceStyleMapping("Calendar", "cat4", "category 4"))^^ didn't work
I also tried this
RadScheduler1.Resources.Add(New Resource("Calendar", "cat1", "category 1"))^^ didn't work
highest preference is to add these colorings only in the provider but if I need to I can also add them dynamically in my page vb code if needed.
I use the webservice to keep from doing any database calls in the page to slow down my page. it would help to have the coloring only in the provider (webservice call) also.
