
Ian Russell
Top achievements
Rank 1
Ian Russell
asked on 22 Nov 2008, 12:17 AM
Is there a way to implement a Selected State of the appointment? Like on a single click I would like to change appointment's style. I saw a post about doing it client-side but I want to implement it server-side.
3 Answers, 1 is accepted
0
Hello Attila Safari,
Thank you for contacting Telerik support.
You could use the AppointmentClick server-side event to change the appearance of the clicked Appointment. However, please have in mind that this event as the Appointment is double-clicked on the client.
In case you want to handle the case on the first click, you could handle the client-side OnClientAppointmentClick event and change the behavior there.
Alternatively, you could use RadAjaxManager to do an AJAX request to the server manually on the first click, perform server-side operations and change the appearance of the clicked Appointment (by using its ID).
Please let me know if you have any additional questions or you need further assistance.
Kind regards,
Simon
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thank you for contacting Telerik support.
You could use the AppointmentClick server-side event to change the appearance of the clicked Appointment. However, please have in mind that this event as the Appointment is double-clicked on the client.
In case you want to handle the case on the first click, you could handle the client-side OnClientAppointmentClick event and change the behavior there.
Alternatively, you could use RadAjaxManager to do an AJAX request to the server manually on the first click, perform server-side operations and change the appearance of the clicked Appointment (by using its ID).
Please let me know if you have any additional questions or you need further assistance.
Kind regards,
Simon
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Oleg
Top achievements
Rank 1
answered on 08 Jan 2009, 04:26 PM
Do you have an example by any chance of how to do it using OnClientAppointmentClick?
0
Hi Oleg,
Here is a client-side solution:
All the best,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Here is a client-side solution:
<script type="text/javascript"> |
var currentlySelectedAppoitment; |
var previouslySelectedAppoitment; |
function OnClientAppointmentClick(sender, eventArgs) { |
if (previouslySelectedAppoitment != null) { |
var prevRsAptElement = previouslySelectedAppoitment.get_element(); |
Sys.UI.DomElement.toggleCssClass(prevRsAptElement, "HighlightStyle"); |
} |
currentlySelectedAppoitment = eventArgs.get_appointment(); |
var rsAptElement = currentlySelectedAppoitment.get_element(); |
Sys.UI.DomElement.toggleCssClass(rsAptElement, "HighlightStyle"); |
previouslySelectedAppoitment = currentlySelectedAppoitment; |
} |
function alertCurrentlySelectedApp() { |
if (currentlySelectedAppoitment) |
alert(currentlySelectedAppoitment.get_subject()); |
} |
</script> |
.HighlightStyle .rsAptOut |
{ |
background: yellow !important; |
} |
All the best,
Peter
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.