- Home
- Forum
- ASP.NET Core - EJ 2
- 'IHtmlHelper<dynamic>' does not contain a definition for 'EJ'
'IHtmlHelper<dynamic>' does not contain a definition for 'EJ'
Hello,
I wanted to access datagrid dynamically so I can configure it from controller. I researched on forums & found the snippet. Here is sample snippet for button control (I took code from here https://www.syncfusion.com/forums/123170/add-columns-dynamically-from-controller-or-through-script)
@(Html.EJ().Button("ClickMe").Text("Click Me").Type(ButtonType.Button).ClientSideEvents(events => events.Click("click")))
However, Syncfusion.JavaScript namespace can't be found & following errors show up
Error CS0234 The type or namespace name 'JavaScript' does not exist in the namespace 'Syncfusion' (are you missing an assembly reference?)
Error CS1061 'IHtmlHelper<JavaScript.Models.GridProperties>' does not contain a definition for 'EJ' and no accessible extension method 'EJ' accepting a first argument of type 'IHtmlHelper<JavaScript.Models.GridProperties>' could be found (are you missing a using directive or an assembly reference?)
I would appreciate, if you can help to get this sorted. A sample project would be highly appreciated.
SIGN IN To post a reply.
4 Replies
AZ
Abaid-ur-Rehman Zulfi
September 9, 2019 12:43 PM UTC
Awaiting reply to fix this issue.
SS
Seeni Sakthi Kumar Seeni Raj
Syncfusion Team
September 9, 2019 01:49 PM UTC
Hi Abaid,
Greetings from Syncfusion.
Please confirm whether you are using the EJ1 Grid or EJ2 Grid. Following link refers to the EJ2 Grid in Asp.Net MVC
If you could provide the details requested by us, it would be easier for us to guide you on your requirement.
Regards,
Seeni Sakthi Kumar S
AZ
Abaid-ur-Rehman Zulfi
September 10, 2019 06:07 AM UTC
Hi,
I am using EJ2 gird in ASP.net Core 2.2 (not ASP.net MVC). Since, I couldn't find any example to access EJ2 controls dynamically in ASP.net core, I took code from MVC thread.
My objective is to access EJ2 DataGrid dynamically so I can change attributes/Datasource on the fly in controller. Please let me know how I can achieve this!
SS
Seeni Sakthi Kumar Seeni Raj
Syncfusion Team
September 11, 2019 06:49 AM UTC
Hi Abaid,
We have already discussed about updating the Grid dataSource dynamically and refreshing the Grid content in the following Help Document.
Regards,
Seeni Sakthi Kumar S
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
AZ Abaid-ur-Rehman Zulfi
- Sep 8, 2019 06:38 AM UTC
- Sep 11, 2019 06:49 AM UTC