Home Unanswered Active Tags New Question

Set CellWidth with a callback

I have buttons to zoom in and out of the DayPilotScheduler control on my page. I am trying to increase or decrease the CellWidth through a callback (handled by ComponentArt's callback control). The zoom in and zoom out functions are executed but the scheduler does not update. What could I be doing wrong? Here's the function that I call -

//called by the callback handler
private void zoomIn() {
Scheduler. CellWidth = 60;
Scheduler.DataSource = CreateEventsTable();
Scheduler.DataBind();
Scheduler.Update();
}

Thanks,
Satyendra Sharma.
Asked by Satyendra Sharma 4 years ago.
Replies
Well, if DayPilot is inside ComponentArt's callback control (I suppose it's something like UpdatePanel from ASP.NET) it won't work.

The problem is that DayPilot needs to execute an initialization JavaScript after update. So far all the third-party callback panels I've tested required DayPilot to be compiled with that particular library as a dependence. Otherwise it wasn't possible to ensure that this code gets executed.

You have two choices here:
1. Switch to UpdatePanel from ASP.NET AJAX Extensions.
2. Use refreshCallBack() client-side method to invoke the callback (ituses an internal callback mechanism). It's possible to change the CellWidth in the server-side Refresh event handler then (this demonstrated in Demo/Scheduler/Default.aspx page).
Comment posted by Dan Letecky 4 years ago.
Thanks! refreshCallback works. I dont need to use another callback control anymore.
Comment posted by Satyendra Sharma 4 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java