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

Using id from event in modal dialog

Asked by Alex
5 years ago.

I want to use the id from the event I clicked in the modal dialog, but when I am using Request.QueryString("id") it always gets the id of the Row.
(e.g. Row with name Room1 has id=1 and event with id=1234. I need id=1234 from event, but I get id=1)

How can I get the id from event?

Answer posted by Dan Letecky [DayPilot]
5 years ago.

You should be able to pass the event id to the modal dialog like this:

<DayPilot:DayPilotScheduler
ID="DayPilotScheduler1"
runat="server"
EventClickHandling="JavaScript"
EventClickJavaScript="eventClick(e);"
...
/>

<script>
function eventClick(e) {
new DayPilot.Modal().showUrl("Edit.aspx?id=" + e.id());
}
</script>

The EventClickJavaScript event handler receives the event object (DayPilot.Event) as "e". You can get the event id by calling e.id().

Please let me know if it doesn't work as expected.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.