I've read the recent posts on applying styles and/or CSS classes to day cells in the RadCalendar. I have similar issues to those being reported by others - most importantly that styles applied during the server side OnDayRender are wiped out by hovering over the day on the client side.
The two solutions offered in previous responses are to wrap the calendar in an asp update panel or to use the SpecialDays collection. The asp update panel exhibits the same problem - I think that only solves client side OnDayRender event firing time issues. Using SpecialDays in our application is problematic because there are several attributes we are trying to convey visually that are orthogonal to one another. For example, person and location. SpecialDays would require enumerating each combination and both are large sets.
So, the first question, is there a workaround for preventing styles from being wiped out by a hover (or select) event on the client? We don't mind hooking prototypes.
Next set of questions...
What we really want to do is override the date click event on the client side. When the date click event occurs we want to style the day based on a set of dropdowns that the user has selected.
For example, imagine two dropdowns of person and location. The user sets the "active" person and "active" location. When they click on the date, color gets set to indicate person and the text is changed to indicate location. We would also fire off a web services event to keep the server in sync as opposed to doing a general postback (we've read the topics on how this requires the asp script manager).
This brings up the following questions:
1. We're using the MultiMonth view which requires AutoPostBack=true. We would like to simply always cancel the selection by using args.set_cancel(true) in the client side event OnDateSelecting. If we do this, are we correct that a postback event will only occur on navigation?
2. We've tried applying styles during OnDateClick. They get wiped out by the focus styles. Can we apply appearance styles during OnDateClick that will not be wiped out by hovering, focus, etc? If so, how?
And...
If we do end up having to enumerate all of the special days, is it possible to add and remove dates from the special days collection via the client side API (assuming all templates are pre-defined).
The two solutions offered in previous responses are to wrap the calendar in an asp update panel or to use the SpecialDays collection. The asp update panel exhibits the same problem - I think that only solves client side OnDayRender event firing time issues. Using SpecialDays in our application is problematic because there are several attributes we are trying to convey visually that are orthogonal to one another. For example, person and location. SpecialDays would require enumerating each combination and both are large sets.
So, the first question, is there a workaround for preventing styles from being wiped out by a hover (or select) event on the client? We don't mind hooking prototypes.
Next set of questions...
What we really want to do is override the date click event on the client side. When the date click event occurs we want to style the day based on a set of dropdowns that the user has selected.
For example, imagine two dropdowns of person and location. The user sets the "active" person and "active" location. When they click on the date, color gets set to indicate person and the text is changed to indicate location. We would also fire off a web services event to keep the server in sync as opposed to doing a general postback (we've read the topics on how this requires the asp script manager).
This brings up the following questions:
1. We're using the MultiMonth view which requires AutoPostBack=true. We would like to simply always cancel the selection by using args.set_cancel(true) in the client side event OnDateSelecting. If we do this, are we correct that a postback event will only occur on navigation?
2. We've tried applying styles during OnDateClick. They get wiped out by the focus styles. Can we apply appearance styles during OnDateClick that will not be wiped out by hovering, focus, etc? If so, how?
And...
If we do end up having to enumerate all of the special days, is it possible to add and remove dates from the special days collection via the client side API (assuming all templates are pre-defined).