Back to Devexpress

ASPxClientGantt.TimeTooltipShowing Event

aspnet-js-aspxclientgantt-d5dec473.md

latest2.9 KB
Original Source

ASPxClientGantt.TimeTooltipShowing Event

Occurs before the Gantt displays the tooltip when users resizes or moves the task in the UI.

Declaration

ts
TimeTooltipShowing: ASPxClientEvent<ASPxClientGanttTimeTooltipShowingEventHandler<ASPxClientGantt>>

Event Data

The TimeTooltipShowing event's data class is ASPxClientGanttTimeTooltipShowingEventArgs. 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 information about the task’s start and end time.

Remarks

Handle the TimeTooltipShowing event to specify custom content for the tooltip that displays the task’s start and end time while the user resizes or moves the task in the UI.

Web Forms:

aspx
<dx:ASPxGantt ID="Gantt" >
    <ClientSideEvents TaskUpdating="function(s, e) {
        var customContainer = document.createElement("div");  
        customContainer.classList.add("custom-time");
        customContainer.textContent = 'End Date: ' + e.item.end;  
        e.container.appendChild(customContainer); 
    }" />
</dx:ASPxGantt>

MVC:

cshtml
@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.ClientSideEvents.TimeTooltipShowing = "function (s, e) { 
        var customContainer = document.createElement("div");  
        customContainer.classList.add("custom-time");
        customContainer.textContent = 'End Date: ' + e.item.end;  
        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