- Home
- Forum
- ASP.NET MVC - EJ 2
- Testing 4
Testing 4
@model List<amar.viewmodels.tachelienviewmodel>
@using Syncfusion.EJ2
<link rel="stylesheet" rel='nofollow' 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
Hi Pravinkumar,
Greetings from Syncfusion.
Thank you for sharing the code snippet. However, we noticed that your message doesn’t include any specific details about the issue or the assistance you need. Could you please clarify your requirement or describe the problem you're facing? Once we have more context, we’ll be happy to help you further.
Regards,
Sridharan
- 1 Reply
- 2 Participants
-
PD Pravinkumar Dhanaraman
- Jul 21, 2025 10:09 AM UTC
- Jul 21, 2025 12:49 PM UTC