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

Razor Syntax

5 Answers 176 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 06 Aug 2014, 11:19 PM
I haven't seen any documentation on razor syntax for the Gantt control. Is this somewhere? I am trying to do the following:

@(Html.Kendo().Gantt(Model) // Bind the grid to the Model property of the view
        .Name("Gannt")
        .Columns(columns => columns.Bound(o=>o.Title).Title("Title"))
        )

And I'm receiving the following error: CS1501: No overload for method 'Gantt' takes 1 arguments

In looking at the ASPX example here: http://docs.telerik.com/kendo-ui/api/wrappers/aspnet-mvc/Kendo.Mvc.UI.Fluent/GanttColumnBuilderBase

<%= Html.Kendo().Gantt(Model)
.Name("Gantt")
.Columns(columns => columns.Bound(o => o.OrderID).Title("ID"))
%>

It looks like the only parameter is the Model itself. This is probably something silly that I'm missing. Any help is greatly appreciated.






5 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 08 Aug 2014, 07:05 AM
Hi Jason,

I confirm that at the moment there is no documentation for the Gantt MVC wrapper, however you could use our online demos to guide you in setting up your gantt:
http://demos.telerik.com/aspnet-mvc/gantt/index

We'll do our best to include the missing documentation articles as soon as we can.

Regards,
Bozhidar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jason
Top achievements
Rank 1
answered on 08 Aug 2014, 01:25 PM
Thanks, Bozhidar! 

I saw that demo, and it was helpful. One thing that I'm not clear on is what the control is looking for in the parameters: Html.Kendo().Gantt<Kendo.Mvc.Examples.Models.Gantt.TaskViewModel, Kendo.Mvc.Examples.Models.Gantt.DependencyViewModel>. 

Do you know if there is a similar, non-MVC implementation of a Gantt control that might explain what these passed objects should look like?

I downloaded the local samples, complied the solution, and went through the code on these ViewModels (TaskViewModel and DependencyViewModel), but I'm still not sure what the purpose is of the DependencyViewModel.

Just a high level overview of what these objects are used for would probably be all that I need.

Thanks!
Jason

0
Richard
Top achievements
Rank 1
answered on 11 Aug 2014, 07:45 AM
Hi,

You can see the structure of the Dependency viewmodel in the example at http://demos.telerik.com/aspnet-mvc/gantt/index

.DependenciesDataSource(d => d
    .Model(m =>
    {
        m.Id(f => f.DependencyID);
        m.PredecessorId(f => f.PredecessorID);
        m.SuccessorId(f => f.SuccessorID);
        m.Type(f => f.Type);
    })

The dependencies model determines the 'arrows' on the Gantt chart (that go from the end of one task to the beginning of another).  These arrows represent the dependencies (ie for each task id:id what task(s) has an arrow pointing to this task (predecessor), and which other task(s) does this task point to.  

I have to admit I have no idea what 'Type' property is used for.

I am experimenting at the moment with using an empty Dependencies viewmodel as I don't need any arrows at this point.
0
Bozhidar
Telerik team
answered on 11 Aug 2014, 08:04 AM
Hi Richard,

The type of the Dependency is a number between 0 and 3, which determines whether the dependency is:
0 - Finish to Finish
1 - Finish to Start
2 - Start to Finish
3 - Start to Start

More details about each of these types can be found here:
http://www.gantt.com/creating-gantt-charts.htm

Another example of the types paired with screenshots for clarity can be found in our ASP.NET documentation for the RadGantt, which uses the kendo Widget internally:
http://www.telerik.com/help/aspnet-ajax/gantt-structure-dependencies.html 

We will also update the documentation to include a more detailed explanation of this property.

Regards,
Bozhidar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jason
Top achievements
Rank 1
answered on 11 Aug 2014, 05:36 PM
Thanks for the help! I too will experiment with the empty Dependencies viewmodel for now. 
Tags
Gantt
Asked by
Jason
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Jason
Top achievements
Rank 1
Richard
Top achievements
Rank 1
Share this question
or