Page 1 of 1

Resource Utilization partnered with Scheduler

Posted: Tue Jun 06, 2023 11:40 am
by srr

Hello

I have a page setup partnering Scheduler with Resource Utilization. I have hundreds of resources in the scheduler, is it possible to have the resource utilization view "jump" to the selected resource when switching/selecting resources in the scheduler view.

Currently I scroll down to find the relevant resource I'm interested in in the Scheduler, then I have to repeat the scrolling to find the same resource in the resource utilization view to see what availability there is for that resource.

If its possible could you please point me in the right direction?

Thank you


Re: Resource Utilization partnered with Scheduler

Posted: Tue Jun 06, 2023 5:03 pm
by marcio

Hey srr,

That's not possible, currently, the ResourceUtilization only has the horizontal scroll partner. One of the reasons is that the row heights are different between the Scheduler/Gantt and the ResourceUtilization widget. You can add as many partners as you like for horizontal scrolling sync using this function https://bryntum.com/products/schedulerpro/docs/api/SchedulerPro/view/ResourceUtilization#function-addPartner

Partners this Timeline with the passed Timeline in order to sync the horizontal scrolling position and zoom level.


Re: Resource Utilization partnered with Scheduler

Posted: Tue Jun 06, 2023 5:27 pm
by arcady

Hello,
If I understood you correctly this code should help:

const scheduler = new SchedulerPro({
    ...
    
    listeners : {
        cellClick({ record }) {
            // scroll resource utilization to the clicked resource row
            resourceUtilization.scrollRowIntoView(
                // get resource representing record in resource utilization view store
                resourceUtilization.store.getModelByOrigin(record),
                // highlight the row element
                { highlight : true }
            );
        }
    }
});

Re: Resource Utilization partnered with Scheduler

Posted: Wed Jun 07, 2023 9:50 am
by srr

Hi arcady,

That's exactly what I was after, thanks for your help.