- Home
- Forum
- ASP.NET MVC - EJ 2
- Testing
Testing
@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>
default.aspx
<div id="divImage" runat="Server" />
default.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
// There will be list of ids that has assing images.
divImage.InnerHtml = "<h3>Hello World</h3> <img src=\"<%= getData(id) %>\"";
}
public string getData(string id)
{
return _client.GetImage(id); //"https://test.com/test-{id}.jpg";
}Attachment: model_Listamar.viewmodels.tachelie_6df043fd.txt
- 2 Replies
- 1 Participant
-
PD Pravinkumar Dhanaraman
- Jul 21, 2025 06:20 AM UTC
- Jul 21, 2025 07:14 AM UTC