//This is my code inside controller
private empcontext db = new empcontext(); // // GET: /Employee/ [GridDataSourceAction] public ActionResult Index() { return View(db.Emps.ToList()); }
//this is my view
@(Html.Infragistics() .Grid<databindingmvc4.Models.Employee>(Model) .ID("grid") .Width("100%") .Height("500px") .PrimaryKey("Id") .AutoGenerateColumns(true) .AutoGenerateLayouts(true) .Columns(column => { column.For(x => x.Id).DataType("int").HeaderText("Id"); column.For(x => x.Name).DataType("string").HeaderText("Name"); column.For(x => x.Address).DataType("string").HeaderText("Address"); }) .DataSourceUrl(Url.Action("Index")) .DataBind() .Render() )
Thanks,
simpi
Hello Simpi,
Are there any clientside exceptions thrown in this case? Can you examine whether all of the grid resources are being successfully loaded? Also, does casting the passed model AsQueryable in the controller make a difference?
A complete runnable sample demonstrating the scenario would be greatly appreciated.
Do not hesitate to contact me with any updates regarding this matter.
Please feel free to contact me if you are still experiencing issues with this matter.