My Scheduler holds two different kinds of business objects, but I only want clicks for one of them. I'm thinking I should probably distinguish between them in the client-side click event. And one idea for doing that is by css class, as the ones I don't want to be clickable all have a common class. And so according to this http://www.telerik.com/help/aspnet-ajax/scheduler-schedulerappointment-object.html page there should be a get_cssClass() method. It does not produce the results I had hoped for though, and when I alert it's return value, it shows "[object Object]"
function AppointmentClick(sender, args) {
var view = sender.get_selectedView();
if (view != 4) {
var appointment = args.get_appointment();
var appointmentID = appointment.get_id();
var class = appointment.get_cssClass();
alert(appointment);
if (class != "resourceLightGrey")
addBooking(appointmentID);
}
}
function AppointmentClick(sender, args) {
var view = sender.get_selectedView();
if (view != 4) {
var appointment = args.get_appointment();
var appointmentID = appointment.get_id();
var class = appointment.get_cssClass();
alert(appointment);
if (class != "resourceLightGrey")
addBooking(appointmentID);
}
}