Or can it only be a number? We use GUIDs for all our identifiers so it'd be nice to be able to use a string for an id of the events in the scheduler
This would allow us to do things like mix different types onto a scheduler since we have globally unique ids
7 Answers, 1 is accepted
You can definitely use a GUID as the id of a scheduler event, as it allows for either a string, a number, or an object.
You can find the API Reference for the Kendo SchedulerEvent in our documentation here.
I hope this helps!
Regards,
Eduardo Serra
Progress Telerik

Hmmm ok yea I see that now....
There must be something else I'm doing wrong then.
Whenever I use a string for the ID then the ID field just comes across as null whenever I edit the SchedulerEvent. Then I'd change it back to a number and it would no longer be null.
Like if I set the id to "1" then I get a "1" when the update on the data source is called but if I set it to like "cat" then it's just null on the data that's posted to the server
I even set the type to string in the schema
schema:
{
model:{
id: "id",
fields: {
id: {from: "id", type: "string"}
}
}
}

alright it doesn't like me calling it "id" I guess
I changed the field on my data structure to be called "Identifier" then mapped that to "id"
schema:
{
model:{
id: "identifier",
fields: {
identifier: { from: "Identifier", type: "string"}
}
}
}
and now it seems to work
I'm glad to hear everything is now working as expected. Indeed, some words are reserved and don't play well with the API.
Regards,
Eduardo Serra
Progress Telerik

So then once I've mapped a different field like Identifier to Id? How can i use dataSource.GetById ?
Because now when I call datasource.getById with my string based field I always just get back undefined
I inspected the kendo model files and the id field is indeed still undefined ... So now can I just not use GetById ?? How do I pull something specific out of the data source then?

I noticed GetByUID
Our ID from the server looks like this
"dbb56553-7c7f-4dc3-9128-f40e4b806b93-1714"
it looks for some reason something is lopping off that last part that's been tacked onto the guid hmmm
I'm guessing I'm just missing something obvious on my side :-p

WAIT I get it :-p
I'm tricking myself ... You all are generating a guid which I was thinking were my guids
Carry on nothing to see here :-)