Back to Devexpress

ASPxClientGantt.ProgressTooltipShowing Event

aspnet-js-aspxclientgantt-f1fe9d2b.md

latest3.1 KB
Original Source

ASPxClientGantt.ProgressTooltipShowing Event

Occurs before the Gantt displays the tooltip when users changes the task’s progress in the UI.

Declaration

ts
ProgressTooltipShowing: ASPxClientEvent<ASPxClientGanttProgressTooltipShowingEventHandler<ASPxClientGantt>>

Event Data

The ProgressTooltipShowing event's data class is ASPxClientGanttProgressTooltipShowingEventArgs. The following properties provide information specific to this event:

PropertyDescription
cancelSpecifies whether to cancel the related action (for example, row edit, export). Inherited from ASPxClientCancelEventArgs.
containerGets the tooltip container.
itemGets the task’s progress information.

Remarks

Handle the ProgressTooltipShowing event to specify custom content for the tooltip that displays the task’s progress while the user resizes the progress handler in the UI.

Web Forms:

aspx
<dx:ASPxGantt ID="Gantt" >
    <ClientSideEvents ProgressTooltipShowing="onProgressTooltipShowing" ... />
</dx:ASPxGantt>
js
function onProgressTooltipShowing(s, e) {
    var customContainer = document.createElement("div");  
    customContainer.classList.add("custom-progress");
    customContainer.textContent = 'Progress: ' + e.item.progress + '%';  
    e.container.appendChild(customContainer); 
}

MVC:

cshtml
@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.ClientSideEvents.ProgressTooltipShowing = "function (s, e) { 
        var customContainer = document.createElement("div");  
        customContainer.classList.add("custom-progress");
        customContainer.textContent = 'Progress: ' + e.item.progress + '%';  
        e.container.appendChild(customContainer); 
    }";
    ...
}).Bind(
    GanttDataProvider.Tasks, GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments
).GetHtml()

Concepts

See Also

ASPxGantt - Overview

MVCxGantt - Overview

ASPxGantt - 'How To' Examples

MVCxGantt - 'How To' Examples

ASPxClientGantt Class

ASPxClientGantt Members