Premium support for our pure JavaScript UI components


Post 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


Post 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.

Best regards,
Márcio


Post 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 }
            );
        }
    }
});

Post by srr »

Hi arcady,

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


Post Reply