Skip to main content
All docs
V24.2

ASPxClientGanttTaskShowingEventArgs.container Property

Returns a container for the task’s content.

Declaration

container: any

Property Value

Type Description
any

A container for the task’s content.

Remarks

Web Forms:

<dx:ASPxGantt ID="Gantt" >
    <ClientSideEvents TaskShowing="function(s, e) {
        var customContainer = document.createElement("div");  
        customContainer.classList.add("custom-task");  
        customContainer.setAttribute("style", "width:" + e.item.taskSize.width + "px;");  
        customContainer.textContent = e.item.taskData["Subject"];  
        e.container.appendChild(customContainer);
    }" />
</dx:ASPxGantt>

MVC:

@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.ClientSideEvents.TaskShowing = "function (s, e) { 
        var customContainer = document.createElement("div");  
        customContainer.classList.add("custom-task");  
        customContainer.setAttribute("style", "width:" + e.item.taskSize.width + "px;");  
        customContainer.textContent = e.item.taskData["Subject"];  
        e.container.appendChild(customContainer);    
    }";
    ...
}).Bind(
    GanttDataProvider.Tasks, GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments
).GetHtml()
See Also