Page 1 of 1

[REACT] Dynamic Column value calculation in Scheduler

Posted: Fri Aug 02, 2024 2:37 pm
by MukilanA

I have a requirement to calculate column values dynamically. I wanted to understand the best way to do that in Scheduler. For example in the below screenshot I want to reduce "R PP" to 0.1 from the current value every minute. Would be nice if I can have some insight on this.


Re: [REACT] Dynamic Column value calculation in Scheduler

Posted: Fri Aug 02, 2024 3:05 pm
by tasnim

Hi,

Sorry, I don't understand what you mean by dynamically calculate column values? Could you please explain?
Are you looking for this https://bryntum.com/products/scheduler/docs/api/Grid/feature/Summary?


Re: [REACT] Dynamic Column value calculation in Scheduler

Posted: Fri Aug 02, 2024 3:47 pm
by MukilanA

No not summary, if you see in the "R PP" column i need to use a setInterval to reduce its value for all the employees by -(minus) 0.1 every minute


Re: [REACT] Dynamic Column value calculation in Scheduler

Posted: Fri Aug 02, 2024 4:17 pm
by tasnim

Sounds like you're looking for this https://bryntum.com/products/grid/examples/stocklist/, this demo shows updating cell values on every 20 milliseconds

Hope this helps.

Best regards,
Tasnim


Re: [REACT] Dynamic Column value calculation in Scheduler

Posted: Fri Aug 02, 2024 7:21 pm
by MukilanA

Exactly but I want to do the similar in Bryntum Scheduler Columns


Re: [REACT] Dynamic Column value calculation in Scheduler

Posted: Fri Aug 02, 2024 9:18 pm
by mats

Please try something like:

setInterval(() => {
    scheduler.suspendRefresh();
    scheduler.resourceStore.forEach(rec => rec.yourField = rec.yourField - 0.1)
    scheduler.resumeRefresh(true);
}, 60000);