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.

MVCxGanttResourceUpdateValues<TResource, TKey> Class

Contains information about updated resources.

Namespace: DevExpress.Web.Mvc

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

Declaration

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

Type Parameters

Name Description
TResource

A type of a resource.

TKey

A type of a resource key.

Remarks

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

    ProcessResourceValues(resourceUpdateValues);
    //...
}

void ProcessResourceValues(MVCxGanttResourceUpdateValues<Resource, string> resourceUpdateValues) {
    foreach(var item in resourceUpdateValues.Update)
        GanttDataProvider.UpdateResource(item);
    foreach(var itemKey in resourceUpdateValues.DeleteKeys)
        GanttDataProvider.DeleteResource(itemKey);
    foreach(var item in resourceUpdateValues.Insert) {
        resourceUpdateValues.MapInsertedItemKey(item, GanttDataProvider.InsertResource(item));
    }
}

Online Demo

Gantt - Data Binding and Modification

Inheritance

Object
MVCxBatchUpdateValues<TResource, TKey>
MVCxGanttItemUpdateValues<TResource, TKey>
MVCxGanttResourceUpdateValues<TResource, TKey>
See Also