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

Getting back additional data from calendarbackend

Asked by Andre Simon
9 years ago.


we are using the daypilot calendar for ASP.NET MVC.

We want to transfer some additional data like a caption for the calendar to the client.
i saw, that the callbackdata will be used when fireing the onAfterRender-Event, so i extend the data in the CalendarBackend. Our Action looks like this:

Public Function CalendarBackend(ByVal CalendarId As Integer, ActiveAppointmentId As Integer) As ActionResult

Dim dpc As New DayPilotCalendar(CalendarId, ActiveAppointmentId)
Dim result = dpc.CallBack(Me)

CType(result, JsonResult).Data("CallBackData") = Json(New With {.headerCaption = "Calendarcaption"})

Return result

End Function

I think, this is not the recommended way, but in the onAfterRender i can use it. Is there a better way to get extra-data? i dont know if the parameter will be deleted in future-versions.

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

You can send custom data using Update() method:

The data parameter will be passed to AfterRenderJavaScript. It is stored in CallBackData internally.

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