All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

MVCxGanttTaskUpdateValues<TTask, TKey> Class

Contains information about updated tasks.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.2.dll

Declaration

public class MVCxGanttTaskUpdateValues<TTask, TKey> :
        MVCxGanttItemUpdateValues<TTask, TKey>
    where TTask : new()
Public Class MVCxGanttTaskUpdateValues(Of TTask As New, TKey)
    Inherits MVCxGanttItemUpdateValues(Of TTask, TKey)

Type Parameters

Name Description
TTask

A type of a task.

TKey

A type of a task key.

Remarks

The following example illustrates how to use the MVCxGanttTaskUpdateValues object. Refer to the online demo to get the full code.

Partial View:

@Html.DevExpress().Gantt(settings => {
    settings.BatchUpdateRouteValues = new { Controller = "Features", Action = "GanttBatchUpdate" };
    // ...
}).Bind(
    GanttDataProvider.Tasks, 
    GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, 
    GanttDataProvider.ResourceAssignments
).GetHtml()

Controller Code:

public ActionResult GanttBatchUpdate(
    MVCxGanttTaskUpdateValues<Task, string> taskUpdateValues,
    MVCxGanttDependencyUpdateValues<Dependency, string> dependencyUpdateValues
    MVCxGanttResourceUpdateValues<Resource, string> resourceUpdateValues,
    MVCxGanttResourceAssignmentUpdateValues<ResourceAssignment, string> resourceAssignmentUpdateValues){

    ProcessTaskValues(taskUpdateValues);
    //...
}

void ProcessTaskValues(MVCxGanttTaskUpdateValues<Task, string> taskUpdateValues) {
    foreach(var item in taskUpdateValues.Update)
        GanttDataProvider.UpdateTask(item);
    foreach(var itemKey in taskUpdateValues.DeleteKeys)
        GanttDataProvider.DeleteTask(itemKey);
    foreach(var item in taskUpdateValues.Insert) {
        taskUpdateValues.MapInsertedItemKey(item, GanttDataProvider.InsertTask(item));
    }
}

Online Demo

Gantt - Data Binding and Modification

Inheritance

Object
MVCxBatchUpdateValues<TTask, TKey>
MVCxGanttItemUpdateValues<TTask, TKey>
MVCxGanttTaskUpdateValues<TTask, TKey>
See Also