how to add this Gantt to existing MVC app?

hi
Im testing your gantt product, but after installing the folders and pasting the html into a cshtml page, its not working.

f12 says File: 1, Line: 186, Column: 2 SCRIPT5009: ‘gantt’ is undefined
gantt.init(“gantt_here”);

maybe its got to be initialized somewhere else

ok its because mvc didnt have the script called at the right place.

but now, the f12 errors out on user data

SCRIPT5009: ‘users_data’ is undefined

how to call the testdata.js to create the user_data needed for the project?
thanks

Can someone please answer, does DHTMLX.Gantt even run in MVC?

i did the examples to the letter, rechecked, then read comments about how its broken and some future version might work.

in Nuget in vs2015 it shows 4.0.0 as latest. just need to know if this can work at all in MVC or if its not yet ready

Hello,
dhtmlxGantt is a JS library with no external dependencies, data is loaded and saved to the backend via ajax calls - i.e. there is no reason why it may not work in MVC.

This is the variables with inline data from our samples, probably you don’t want it in your app.

Please check these articles
docs.dhtmlx.com/gantt/desktop__loading.html
dhtmlx.com/blog/using-dhtmlx … p-net-mvc/

yes thanks, this helped to figure it out. I hadnt seen that mvc example, will work thru this

meanwhile there is a puzzling effect, could be javascript, but i added in the filtering feature to display days or months. when refreshing the page i always have to click 2 things, the Zooming: months and display: workdays, even when its checked. then it formats the gantt right.

I put a function together hoping it would start out this way,

<script type="text/javascript"> $(function(){ zoom_tasks("month"); set_scale_units("work_week"); set_scale_units(); }); </script>

it has no effect. Added the blank call to set scale units. i still have to click on the filter buttons.

in my case its display only, the gantt should not be allowed to change, but thinking more about it, it might be a helpful tool to sketch some changes and save it that way

but Im not able to set the config to show months across, the projects span over a year, it always starts out showing Jan 1 Jan 2 Jan 3 Jan 4…