Our state of the art Gantt chart


Post by omkar ankam »

I need to get the window.instance as we are getting undefined while initiating
console.log(window._instance);

gantt-OSI-L-0770.PNG
gantt-OSI-L-0770.PNG (9.73 KiB) Viewed 231 times

Post by tasnim »


Post by omkar ankam »

gantt.PNG
gantt.PNG (13.76 KiB) Viewed 210 times

Post by mats »

We don't have any _instance variable assigned to window, can you please explain a bit further?


Post by marcio »

Hey omkar ankam,

To access the instance in a React application, as Tasmin shared with that link, you need to access the ref that you set to your Gantt.

ganttRef.current.instance

If you still have questions, if you could share how is your component coded, that would help us to understand your structure.

Best regards,
Márcio


Post by omkar ankam »

I want to retrive all my project details through instance


Post by omkar ankam »

gantt.PNG
gantt.PNG (13.88 KiB) Viewed 180 times

Post by alex.l »

Hi,

Could you please be more specific? I cannot understand the question.
Your last screenshot is a TypeScript problem, isn't it?

Please provide a test case, steps to reproduce, expected result and actual result, and we will be able to help faster.
I would recommend you to read our guide https://bryntum.com/products/gantt/docs/guide/Gantt/integration/react/guide#accessing-the-bryntum-gantt-instance and check examples that have this code in sources. You can find them in examples/react/ folder of the sources you downloaded from CustomerZone.

Here is the guide How to ask for help viewtopic.php?t=772

All the best,
Alex


Post Reply