This is a migrated thread and some comments may be shown as answers.

How to delete and update dependency in Gantt?

1 Answer 307 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Antonio
Top achievements
Rank 1
Antonio asked on 28 Jan 2016, 04:44 PM

How can I delete and update a dependency in Gantt?...  What actions should I take?..  i don't see buttons (for delete) or forms (for edit)

 

Also... this is correct for the Gantt's functionality?

 

<div id="URLEliminarDependencia" data-request-url="@Url.Action("EliminarDependencia", "EventoProgramadoes", new { IdCronograma = ViewData["IdCronograma"] })"></div>

 

var dependenciesDataSource = new kendo.data.GanttDependencyDataSource({
        transport: {
            read: {
                url: $('#URLObtenerDependencias').data('request-url'),
                dataType: "jsonp"
            },
            update: {
                url: $('#URLActualizarDependencia').data('request-url'),
                dataType: "jsonp"
            },
            destroy: {
                url: $('#URLEliminarDependencia').data('request-url'),
                dataType: "jsonp"
            },

            create: {
                url: $('#URLCrearDependencia').data('request-url'),
                dataType: "jsonp"
            },
            parameterMap: function (options, operation) {
                if (operation !== "read") {
                    return { models: kendo.stringify(options.models || [options]) };
                }
            }
        },

 

 

 

Controller:

 

     public JsonResult EliminarDependencia(int IdCronograma)
        {
            var models = this.DeserializeObject<IEnumerable<GanttDependencyModel>>("models").ToList();

            ---more code---
            return this.Jsonp(models);
        }

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 29 Jan 2016, 08:35 AM
Hello,

In order to delete a dependency, you must click on it to select it, and afterwards press the delete key on the keyboard.

As for the controller methods, you can see their implementation in the code section of the following demo:
http://demos.telerik.com/aspnet-mvc/gantt/index


Regards,
Bozhidar
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Gantt
Asked by
Antonio
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or