Skip to main content
All docs
V19.2

GanttExtension.GetBatchUpdateResult<TTask, TTaskKey, TDependency, TDependencyKey, TResource, TResourceKey, TResourceAssignment, TResourceAssignmentKey>(MVCxGanttTaskUpdateValues<TTask, TTaskKey>, MVCxGanttDependencyUpdateValues<TDependency, TDependencyKey>, MVCxGanttResourceUpdateValues<TResource, TResourceKey>, MVCxGanttResourceAssignmentUpdateValues<TResourceAssignment, TResourceAssignmentKey>) Method

Returns the specified result to the client side after a callback is processed in an action specified by the BatchUpdateRouteValues property.

Namespace: DevExpress.Web.Mvc

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

Declaration

public static ActionResult GetBatchUpdateResult<TTask, TTaskKey, TDependency, TDependencyKey, TResource, TResourceKey, TResourceAssignment, TResourceAssignmentKey>(
    MVCxGanttTaskUpdateValues<TTask, TTaskKey> taskUpdateValues,
    MVCxGanttDependencyUpdateValues<TDependency, TDependencyKey> dependencyUpdateValues,
    MVCxGanttResourceUpdateValues<TResource, TResourceKey> resourceUpdateValues,
    MVCxGanttResourceAssignmentUpdateValues<TResourceAssignment, TResourceAssignmentKey> resourceAssignmentUpdateValues
)
    where TTask : new()
    where TDependency : new()
    where TResource : new()
    where TResourceAssignment : new()

Parameters

Name Type Description
taskUpdateValues MVCxGanttTaskUpdateValues<TTask, TTaskKey>

An object that stores information about updated tasks.

dependencyUpdateValues MVCxGanttDependencyUpdateValues<TDependency, TDependencyKey>

An object that stores information about updated dependencies.

resourceUpdateValues MVCxGanttResourceUpdateValues<TResource, TResourceKey>

An object that stores information about updated resources.

resourceAssignmentUpdateValues MVCxGanttResourceAssignmentUpdateValues<TResourceAssignment, TResourceAssignmentKey>

An object that stores information about updated resource assignments.

Type Parameters

Name Description
TTask

A type of a task.

TTaskKey

A type of a task key.

TDependency

A type of a dependency.

TDependencyKey

A type of a dependency key.

TResource

A type of a resource.

TResourceKey

A type of a resource key.

TResourceAssignment

A type of a resource assignment.

TResourceAssignmentKey

A type of a resource assignment key.

Returns

Type Description
ActionResult

The action method’s result.

Remarks

The following example illustrates how to use the GetBatchUpdateResult method. 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);
    ProcessDependencyValues(dependencyUpdateValues);
    ProcessResourceValues(resourceUpdateValues);
    ProcessResourceAssignmentValues(resourceAssignmentUpdateValues);
    return GanttExtension.GetBatchUpdateResult(
        taskUpdateValues, 
        dependencyUpdateValues, 
        resourceUpdateValues, 
        resourceAssignmentUpdateValues);
}

void ProcessTaskValues(MVCxGanttTaskUpdateValues<Task, string> taskUpdateValues) {
    // your code
}

void ProcessDependencyValues(
    MVCxGanttDependencyUpdateValues<Dependency, string> dependencyUpdateValues) {
    // your code
}

void ProcessResourceValues(
    MVCxGanttResourceUpdateValues<Resource, string> resourceUpdateValues) {
    // your code
}
void ProcessResourceAssignmentValues(
    MVCxGanttResourceAssignmentUpdateValues<ResourceAssignment, string> resourceAssignmentUpdateValues) {
    // your code
}

Online Demo

Gantt - Data Binding and Modification

See Also