@model List<amar.viewmodels.tachelienviewmodel>
@using Syncfusion.EJ2
<link rel="stylesheet" rel='nofollow' href="https://cdn.syncfusion.com/ej2/28.2.12/fluent.css">
<div class="ganttContainer">
@Html.EJS().Gantt("Gantt").DataSource(
(IEnumerable<object>)Model).Height(
"700px").Width(
"100%").EditSettings(edit =>
{
edit.AllowEditing(true);
edit.AllowTaskbarEditing(true);
}).AllowParentDependency(
true).AllowResizing(
true).AllowTaskbarDragAndDrop(
true).AllowSorting(
true).TaskFields(
ts => ts.Id(
"TaskId").Name(
"TaskName").StartDate(
"StartDate").EndDate(
"EndDate").Duration(
"Duration").Progress(
"Progress").Dependency(
"Predecessor").Child(
"SubTasks")).Columns(col =>
{
col.Field("OrdreLien").Width(50).Add();
col.Field("OrdreGamme").Width(50).Add();
col.Field("StartDate").Width(100).Add();
col.Field("TaskId").Width(50).Add();
col.Field("TaskPredName").Width(0).Add();
col.Field("TaskName").Width(250).Add();
col.Field("TaskSuccName").Width(0).Add();
}).WorkWeek(new string[] { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }).SortSettings(
ss => ss.Columns(col =>
{
col.Field("StartDate").Direction(Syncfusion.EJ2.Gantt.SortDirection.Ascending).Add();
})).SplitterSettings(ss => ss.Position("50%")).Render()
@Html.EJS().ScriptManager()
here's my ajax call (including the 100%width :
$.ajax({
url: configLIST.urlGammeLiens,
data: {
gammeId: gammeId
},
type: 'POST',
cache: false,
success: function (partial) {
$('#prep-body-container').html(partial);
$('.e-gantt-splitter').addClass('autoWidth')
$('#prep-modal').modal('show');
//eval(document.getElementById('prep-body-container').querySelector('script').innerHTML);
}
});
thank you for your time !
</object></div></amar.viewmodels.tachelienviewmodel>t