Back to Devexpress

ASPxClientGantt.FocusedTaskChanged Event

aspnet-js-aspxclientgantt-e0102155.md

latest3.1 KB
Original Source

ASPxClientGantt.FocusedTaskChanged Event

Occurs after a task is focused.

Declaration

ts
FocusedTaskChanged: ASPxClientEvent<ASPxClientGanttFocusedTaskChangedEventHandler<ASPxClientGantt>>

Event Data

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

PropertyDescription
keyReturns the task key.
processOnServerSpecifies whether or not to process the event on the server. Inherited from ASPxClientProcessingModeEventArgs.
valuesReturns the task data.

Remarks

Use the FocusedTaskChanged event to process data when a task is focused. Set the processOnServer property to true to fire the server-side FocusedTaskChanged event and process task data on the server.

Run Demo: ASPxGantt - Client-Side EventsRun Demo: MVCxGantt - Client-Side Events

Web Forms:

aspx
<dx:ASPxGantt ID="Gantt" >
    <ClientSideEvents FocusedTaskChanged="function(s, e) {
        if (e.key == 0) {
            ...
            e.processOnServer = true;
        }
    }" />
</dx:ASPxGantt>

MVC:

cshtml
@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.ClientSideEvents.FocusedTaskChanged = "function (s, e) { 
        if (e.key == 0) {
            ...
            e.processOnServer = true;
        }       
    }";
    ...
}).Bind(
    GanttDataProvider.Tasks, GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments
).GetHtml()

Concepts

See Also

ASPxClientGantt.GetFocusedTaskKey

ASPxClientGantt.FocusedTaskChanging

ASPxGantt - Overview

MVCxGantt - Overview

ASPxGantt - 'How To' Examples

MVCxGantt - 'How To' Examples

ASPxClientGantt Class

ASPxClientGantt Members