I'm grappling with how to pass two views to the Gantt chart properly. I notice from the examples that Telerik are using Services to provide the datasources but I really wanted to Strongly Type my (partial) view and maintain the MV(VM)C convention.
So I have:
Viewmodel:
Controller:
View:
I'm getting a syntactical error in the view in respect of TTaskModel not being able to be inferred. I can't find any examples of this approach - could anyone give me guidance?
Many thanks
So I have:
Viewmodel:
Namespace
Models
Public
Class
Tasks
<Key> <Display(Name:=
"Job"
)>
Public
Property
TaskID
As
Integer
<Display(Name:=
"Project Name"
)>
Public
Property
Title
As
String
<Display(Name:=
"Start"
)>
Public
Property
StartDate
As
Date
<Display(Name:=
"End"
)>
Public
Property
EndDate
As
Date
End
Class
Public
Class
Dependencies
<Key> <Display(Name:=
"Dependency Id"
)>
Public
Property
DependencyID
As
Integer
<Display(Name:=
"Predecessor Id"
)>
Public
Property
PredecessorId
As
Integer
<Display(Name:=
"Successor Id"
)>
Public
Property
SuccessorId
As
Integer
<Display(Name:=
"Type"
)>
Public
Property
Type
As
Integer
End
Class
Public
Class
TypeDep
Public
Task
As
IEnumerable(Of Tasks)
Public
Dep
As
IEnumerable(Of Dependencies)
End
Class
End
Namespace
Controller:
Dim
iTasks
As
IEnumerable(Of Models.Tasks)
Dim
iDeps
As
IEnumerable(Of Models.Dependencies)
Dim
TD
As
New
Models.TypeDep
TD.Task = iTasks
TD.Dep = ideps
Return
PartialView(
"Gantt"
, TD)
View:
@ModelType ienumerable(Of IMS_2.Models.Typedep)
@(Html.Kendo().Gantt(Model).Name("chart").Title("Example Column Chart"))
I'm getting a syntactical error in the view in respect of TTaskModel not being able to be inferred. I can't find any examples of this approach - could anyone give me guidance?
Many thanks