I tried to use a mix of what i found online and your sample on the IgniteUI page and the default app in VS2012 and the code generated from the mvc helper is saying undefined is not a function. Here is the code i have on the index and what the controller is doing.
@(Html.Infragistics()
.Grid<NOMISe.eSIMON.Web.UI.Areas.Admin.Models.UserIndexView.UserIndexViewEntity>() .ID("userGrid") .Columns(column => { column.For(x => x.ID).HeaderText("ID").DataType("string").Hidden(true); column.For(x => x.DisplayName).HeaderText("Full Name").DataType("string").Width("20%"); column.For(x => x.Email).HeaderText("Email").DataType("string").Width("20%"); column.For(x => x.Status).HeaderText("Status").DataType("int").Width("10%"); column.For(x => x.Department).HeaderText("Department").DataType("string").Width("25%"); column.For(x => x.ExpirationDate).HeaderText("Expiration Date").DataType("dateLong").Width("25%"); }) .Width("100%") .Height("600px") .PrimaryKey("ID") .DataBind() .Render())
the controller:
[PermissionAttribute(Core.Security.SecurityMask.View)] public ActionResult Index() { UserIndexView viewModel = new UserIndexView();
IEnumerable<UserIndexView.UserIndexViewEntity> userList = from user in userService.All() select new UserIndexView.UserIndexViewEntity { ID = user.ID, DisplayName = user.DisplayName, Email = user.Email, Status = user.Status, Department = user.Department, ExpirationDate = user.ExpirationDate };
viewModel.UserIndexViewEntitys = userList;
return View(viewModel); }
Hello ekolluri ,
Thank you for posting in our forum.
I see you’re returning the data that the grid should use in the Action, however it doesn’t seem like the grid is using that data.
You should either see the model to be used by the grid:
@(Html.Infragistics().Grid<NOMISe.eSIMON.Web.UI.Areas.Admin.Models.UserIndexView.UserIndexViewEntity>(Model. UserIndexViewEntitys)
Or set the DataSource or DataSourceURL options since otherwise the grid will have no data source to bind to.
I’ve attached an example of how the grid can be bound via the Model.
Please refer to the attached sample and let me know if you have any questions.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://es.infragistics.com/support