All docs
V20.1
20.1
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.

MVCxGanttResourceAssignmentUpdateValues<TAssignment, TKey> Class

Contains information about updated resource assignments.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v20.1.dll

Declaration

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

Type Parameters

Name Description
TAssignment

A type of a resource assignment.

TKey

A type of a resource assignment key.

Remarks

The following example illustrates how to use the MVCxGanttResourceAssignmentUpdateValues 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){

    ProcessResourceAssignmentValues(resourceAssignmentUpdateValues);
    //...
}

void ProcessResourceAssignmentValues(
  MVCxGanttResourceAssignmentUpdateValues<ResourceAssignment, string> resourceAssignmentUpdateValues) {
    foreach(var itemKey in resourceAssignmentUpdateValues.DeleteKeys)
        GanttDataProvider.DeleteResourceAssignment(itemKey);
    foreach(var item in resourceAssignmentUpdateValues.Insert) {
        resourceAssignmentUpdateValues.MapInsertedItemKey(item, GanttDataProvider.InsertResourceAssignment(item));
    }
}

Online Demo

Gantt - Data Binding and Modification

Inheritance

Object
MVCxBatchUpdateValues<TAssignment, TKey>
MVCxGanttItemUpdateValues<TAssignment, TKey>
MVCxGanttResourceAssignmentUpdateValues<TAssignment, TKey>
See Also