- Home
- Forum
- ASP.NET MVC
- Simple Grid
Simple Grid
New to syncfusion and having great difficulty in rendering a simple grid, have gone through circular reference issues and such like but now can render the grid but there's no data rendering,
controller
public ActionResult Index()
{
ViewBag.datasource = db.Users.ToList();
return View();
}
View
@using WMS.Models
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Index</h2>
@(Html.EJ().Grid<User>("Grid")
.Datasource((IEnumerable<User>)ViewBag.datasource)
)
SIGN IN To post a reply.
3 Replies
PK
Prasanna Kumar Viswanathan
Syncfusion Team
December 23, 2016 11:14 AM UTC
Hi Stephen,
Thanks for contacting Syncfusion support.
|
Queries |
Response | |
|
Circular Reference issues
|
The circular reference error in data is resolved by using the select method. The following error is due to when we have same table, then object cannot be serialized. So, we suggest you to use select method to get the selected data from the table. For the following error please refer this link
Please find the below code snippet for avoid the circular reference error:
| |
|
Data is not rendered
|
You have mentioned that data is not rendered on the grid. So, please confirm the following details to find out the root cause of the issue.
1. Did you face any script error in the console? If yes, share the screenshot and stackrace of an issue.
2. Ensure that you have referred the following script file in your sample.
3. Code example of a Grid.
4. Ensure that you have referred set “@Html.EJ().ScriptManager()” in _Layout file. The main reason for referring the ScriptManager in _Layout file is that, it can be referred as common by all the View files present within your application and it should be included in the _Layout.cshtml.
5. Essential Studio Version details.
Try the attached sample and still if you face the issue please provide above details it will helpful to provide the better solution.
Refer to the Help document of Getting started.
|
Regards,
Prasanna Kumar N.S.V
GS
Grant Stephen
January 6, 2017 02:35 PM UTC
any thanks, used a combination of Select new and viewModel
PK
Prasanna Kumar Viswanathan
Syncfusion Team
January 9, 2017 04:07 AM UTC
Hi Stephen,
We are happy to hear that your issue has been resolved.
Please let us know if you need any further assistance.
Regards,
Prasanna Kumar N.S.V
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
GS Grant Stephen
- Dec 22, 2016 05:01 PM UTC
- Jan 9, 2017 04:07 AM UTC