Having trouble getting help?
Contact Support
Contact Support
Checkbox Column in gantt control
3 Jan 20241 minute to read
To render boolean values as checkbox in columns, you need to set displayAsCheckBox
property as true.
<ejs-gantt id='Gantt' dataSource="ViewBag.DataSource" height="550px" gridLines="Both" treeColumnIndex="1">
<e-gantt-taskfields id="TaskId" name="TaskName" startDate="StartDate"
endDate="EndDate" duration="Duration" progress="Progress" dependency="Predecessor" child="SubTasks">
</e-gantt-taskfields>
<e-gantt-columns>
<e-gantt-column field="TaskId"></e-gantt-column>
<e-gantt-column field="TaskName" headerText="Name" width="250"></e-gantt-column>
<e-gantt-column field="Verified" headerText="Verified" displayAsCheckBox="true"></e-gantt-column>
<e-gantt-column field="Progress"></e-gantt-column>
<e-gantt-column field="StartDate"></e-gantt-column>
<e-gantt-column field="Duration"></e-gantt-column>
</e-gantt-columns>
</ejs-gantt>
public IActionResult Index()
{
ViewBag.DataSource = GanttData.ProjectNewData();
return View();
}