Home Unanswered Active Tags New Question

Update Resource Columns during CallBack in DayPilotScheduler

I'm using DayPilotScheduler to display employee schedules. Depending on the user's selection, I add additional columns into the Employee resources that display time and expense for the employee's schedule for the week. I can change resources during a CallBack (i.e. change the employees being displayed). However, I cannot add or remove the additional columns during the CallBack. The data inside the columns changes, but I cannot actually remove or add them. If I change the resources, they have whatever columns were initially loaded in the scheduler. If I look at the dps object on the client-side and look into the dps.rows property during the afterRender event, the columns are changed correctly based on what was done at the server, but they are not redrawn to the screen. Any ideas?
Asked by CSGuy57 1 year ago.
1 other person also wants an answer.
Replies

It seems to work fine. I've modified the Demo/Scheduler/RowHeaderColumns.aspx.cs example as follows:

    protected void DayPilotScheduler1_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e)
    {
        #region Simulation of database update
        // ...
        #endregion

        Resource r = DayPilotScheduler1.Resources.FindByValue(e.NewResource);
        if (r.Columns.Count == 0)
        {
            r.Columns.Add(new ResourceColumn());
        }
        r.Columns[0].InnerHTML = "Moved here";

        setDataSourceAndBind();
        DayPilotScheduler1.Update("Event moved.");
    }

It modifies the HTML of the first additional column after an event is moved.

Answer posted by Dan Letecky [DayPilot] 8 months ago.
New Reply
This reply is
Your name (optional):

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