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

Set CellWidth with a callback

Asked by Satyendra Sharma
14 years ago.
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();

Satyendra Sharma.
Comment posted by Dan Letecky
14 years ago.
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 Satyendra Sharma
14 years ago.
Thanks! refreshCallback works. I dont need to use another callback control anymore.
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.