This is a migrated thread and some comments may be shown as answers.

ID is now index? How do I get the ID?

4 Answers 55 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
PaulMrozowski
Top achievements
Rank 1
PaulMrozowski asked on 26 Nov 2008, 02:17 PM
It looks like the behavior of the scheduler changed - previously, I could access the real ID of the appointment on the client side when the user clicked on an event via: eventArgs._appointment.ID. This appears to have been changed (although I don't see anything in the docs about this) so that it now returns the index of the item clicked, NOT the ID. How do I get the ID?  NOTE: I've implemented my own provider.


4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Nov 2008, 02:57 PM
Hi Paul,

You have used a privete property. We suggest you always use the public methods that are available in the Client API. Please, try the following:

 <script type="text/javascript">  
        function OnClientAppointmentClick(sender, eventArgs) {  
            alert(eventArgs.get_appointment().get_id());  
        }      
    </script> 


Kind regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
PaulMrozowski
Top achievements
Rank 1
answered on 26 Nov 2008, 03:15 PM
 I get that - the problem is that ID no longer returns the ID. It's returning the Index. I really want the ID.
0
PaulMrozowski
Top achievements
Rank 1
answered on 26 Nov 2008, 03:20 PM
 Hmm...my mistake. It appears like something else is broken in my code. The ID was a low enough number to appear to be the index (and the docs say that's what it's doing):

get_id() None Int Gets the index of the Appointment in the Scheduler's list of all Appointments.




0
Peter
Telerik team
answered on 26 Nov 2008, 03:34 PM
Hello Paul,

Thanks for spotting this. Apparently, this is an error in the documentation which we will fix shortly.


Regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
PaulMrozowski
Top achievements
Rank 1
Answers by
Peter
Telerik team
PaulMrozowski
Top achievements
Rank 1
Share this question
or