Hi,
I was just wondering if it's possible to format specific dates. I have a list of Stat holidays that I want to grab from the database and I basically just want them to be a different colour than all the other dates. Is that possible?
I was just wondering if it's possible to format specific dates. I have a list of Stat holidays that I want to grab from the database and I basically just want them to be a different colour than all the other dates. Is that possible?
9 Answers, 1 is accepted
0
Chris
Top achievements
Rank 1
answered on 12 Aug 2008, 01:32 PM
It may be actually easier to ask if it's possible to format individual cells?
0
Hello Chris,
Thank you for contacting Telerik support.
It is possible to change the appearance of the Time Slots of RadScheduler. You could change the CSS of the Time Slots in Week and Month View, as they are created on the server depending on whether they are special Holidays.
For example, assuming that you have the special Holidays list already loaded in an ArrayList you could try the following:
Here, specialHoliday is the name of the CSS class defined on the page:
Best wishes,
Simon
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thank you for contacting Telerik support.
It is possible to change the appearance of the Time Slots of RadScheduler. You could change the CSS of the Time Slots in Week and Month View, as they are created on the server depending on whether they are special Holidays.
For example, assuming that you have the special Holidays list already loaded in an ArrayList you could try the following:
protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e) |
{ |
if (this.RadScheduler1.SelectedView == SchedulerViewType.WeekView || |
this.RadScheduler1.SelectedView == SchedulerViewType.MonthView) |
{ |
if (specialHolidays.IndexOf(e.TimeSlot.Start.Date) > -1) |
{ |
e.TimeSlot.CssClass = "specialHoliday"; |
} |
} |
} |
Here, specialHoliday is the name of the CSS class defined on the page:
.specialHoliday |
{ |
background: yellow !important; |
} |
Best wishes,
Simon
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris
Top achievements
Rank 1
answered on 14 Aug 2008, 01:31 PM
I believe I'm using an older version of the control and there's no way I can get the updated version. All the events I can use are:
AppointmentCancelingEdit
AppointmentClick
AppointmentCommand
AppointmentCreated
AppointmentDataBound
AppointmentDelete
AppointmentInsert
AppointmentUpdate
Databinding
Databound
Disposed
FormCreated
FormCreating
Init
Load
NavigationCommand
NavigationComplete
PreRender
Unload
Is there anything I can do with those at all?
AppointmentCancelingEdit
AppointmentClick
AppointmentCommand
AppointmentCreated
AppointmentDataBound
AppointmentDelete
AppointmentInsert
AppointmentUpdate
Databinding
Databound
Disposed
FormCreated
FormCreating
Init
Load
NavigationCommand
NavigationComplete
PreRender
Unload
Is there anything I can do with those at all?
0
Hi Chris,
The TimeSlotCreated event is available in the version (2008.2.723) that you have specified to be using.
If this is not your version, please upgrade.
Kind regards,
Simon
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The TimeSlotCreated event is available in the version (2008.2.723) that you have specified to be using.
If this is not your version, please upgrade.
Kind regards,
Simon
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kate
Top achievements
Rank 1
answered on 07 May 2010, 08:41 PM
Is this still the recommended solution?
Are there other ways of doing this now with later versions in place?
I am looking for ability to use colour and or images for list of stats. Note: this will also need to take into consideration users from several locations that may have different stats according to location.
Are there other ways of doing this now with later versions in place?
I am looking for ability to use colour and or images for list of stats. Note: this will also need to take into consideration users from several locations that may have different stats according to location.
0
Hello Kate,
This is still the recommended solution. We don't have any mechanism in place to allow you to customize the appearance of the time slot in a way that doesn't require writing code. We will consider our options for solving this problem in a more intuitive way.
Greetings,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
This is still the recommended solution. We don't have any mechanism in place to allow you to customize the appearance of the time slot in a way that doesn't require writing code. We will consider our options for solving this problem in a more intuitive way.
Greetings,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Chris
Top achievements
Rank 1
answered on 10 May 2010, 04:36 PM
Is it possible to also add hover text to the cell that has the holiday? I'm storing the Holidays in a hash table, with the date being the key, and the value being the name of the holiday. I want the user to have the ability to see what the name of the holiday is. This is what I currently have. My CSS class currently just has the background colour set.
Protected Sub radScheduler_TimeSlotCreated(ByVal sender As Object, ByVal e As TimeSlotCreatedEventArgs) Handles radScheduler.TimeSlotCreated |
If radScheduler.SelectedView = SchedulerViewType.WeekView Or radScheduler.SelectedView = SchedulerViewType.MonthView Then |
If Holidays.ContainsKey(e.TimeSlot.Start.Date) Then |
e.TimeSlot.CssClass = "specialHoliday" |
End If |
End If |
End Sub |
0
Accepted
Hello Chris,
Please, try the following:
Best wishes,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Please, try the following:
Protected
Sub
RadScheduler1_TimeSlotCreated1(sender
As
Object
, e
As
TimeSlotCreatedEventArgs)
e.TimeSlot.Control.Attributes.Add(
"title"
,
"custom tooltip"
)
End
Sub
Best wishes,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Chris
Top achievements
Rank 1
answered on 12 May 2010, 03:54 PM
That works. Thanks!