Hi.
I try to test your example for the Gantt control in Visual Studio:
https://ej2.syncfusion.com/aspnetmvc/documentation/gantt/getting-started/
but I run into some issues:
I have added the using to the top of the Index file like so:
@using Syncfusion.EJ2
@{
ViewBag.Title = "Home Page";
}
but I get the error:
Error CS0234 The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
Error CS0103 The name 'ViewBag' does not exist in the current context
And adding this to the bottom of the file:
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable
)ViewBag.DataSource).Height("450px").TaskFields(ts => ts.Id("TaskId").Name( "TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").Child("SubTasks")).Render()
Gives me the error
Error CS1929 'HtmlHelper' does not contain a definition for 'EJS' and the best extension method overload 'HtmlMVCExtension.EJS(HtmlHelper)' requires a receiver of type 'HtmlHelper'
Tommy
1 Reply
1 reply marked as answer
KR
Karthikeyan Raja
Syncfusion Team
November 19, 2020 12:02 PM UTC
Marked as answer
1 Reply
2 Participants
Marked answer
Want to subscribe?
Created by
TK
Tommy Klausen
Platform
Control
Created On Nov 18, 2020 07:28 AM UTC
Last Activity On Nov 19, 2020 12:02 PM UTC
4/12/2025 05:11:58 PM
Sun, 15 December 2024 03:30:00 UTC
Sun, 15 December 2024 03:30:00 AM
Wed, 16 Feb 2022 04:59:00 UTC