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

Custom data in afterRender method on initial load is always null

Asked by Anton
10 years ago.

Hello,

I use ASP.NET Scheduler Pro for WebForms (v7.8.3169).

Is it possible to assign custom data for afterRender method on initial load (code behind)? How can I do it?
Update(data) works only on callbacks. On initial load is data in afterRender method (client) always null.

Please help

Thanks

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

Hi Anton,

The latest version (7.8.3212) now passes custom data from Update() call to the Scheduler during the initial page load as well.

You can download it in the sandbox:

http://www.daypilot.org/sandbox/

Usage:

1. You need to call DayPilotScheduler.Update() in Page_Load to pass the data to the client side:

    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            // ...
            DayPilotScheduler1.Update("server data");
        }
    }

Client side:

<DayPilot:DayPilotScheduler 
  AfterRenderJavaScript="if (data) console.log(data);" 
  ...
Comment posted by Anonymous
10 years ago.

Hi Dan,

it's exactly what I needed.

Thanks

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