search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Following Event Editing example, but id is incorrect

Asked by richk74
13 days ago.

I have copied the code from the tutorial verbatim, but when I try to edit an event I get an error related to the id.
It is getting passed to the Javascript not as a value, but as script. All of the below is exactly what the id variable contains. What could possibly be causing this? On a side note, if I create a context menu with an "Open" command per that tutorial the Javascript works fine.

function($0k){if(typeof $0k==='undefined'){return e.data.id;}else{this.temp().id=$0k;}}
__proto__:
function() {
[native code]
}

arguments: null
caller: null
length: 1
prototype: {...}

Answer posted by richk74
13 days ago.

I solved this. The documentation is incorrect for ASP.NET Web Forms.

It tells you to use the following code:

EventClickHandling="JavaScript"
EventClickJavaScript="editEvent(e.id);"

But this doesn't work. It needs to read as:

EventClickHandling="JavaScript"
EventClickJavaScript="editEvent(e.data.id);"

It is missing the "data" in the example.

Comment posted by Dan Letecky [DayPilot]
12 days ago.

Thanks for posting the solution!

Please note that e.id is a method and it needs to be used like this:

EventClickJavaScript="editEvent(e.id());"

Another option is to use editEvent(e.data.id) as you found out.

I wasn't able to find the doc page with the typo, can you please let me know the URL so it can be fixed?

New Reply
This reply is
Your name (optional):