This question is locked. New answers and comments are not allowed.
I'm trying to do simple binding on the server side and it doesn't seem to work. I've used the grid examples as a guideline and tweeked it in many ways. Nothing seems to get it to call the CustomServerBinding() function, I just get all the data in the table.
Please note that this is pre-purchase testing that must wrap up by tomorrow.
Here's what I have in the most basic form:
GridTest2.cshtml:
@model Domains.TmsEntities @{ ViewBag.Title = "GridTest2"; } <h2>GridTest2</h2> <div> @(Html.Telerik().Grid(Model.T_BASE_RSRC) .Name("Grid") .DataBinding(dataBinding => dataBinding.Server().Select("CustomServerBinding", "Grid")) .EnableCustomBinding(true) .Columns(columns => { columns.Bound(o => o.NAME_NM).Title("Name").Width(170); }) ) </div>
GridController.cs:
public class GridController : Controller { public ActionResult GridTest2() { return View(new Domains.TmsEntities()); } // Never runs the CustomServerBinding() function [GridAction(EnableCustomBinding = true, GridName = "Grid")] public ActionResult CustomServerBinding(GridCommand command) { IEnumerable data = (new Domains.TmsEntities()).T_BASE_RSRC.Take(10); return View(data); } }
My MVC install was last week and from http://www.telerik.com/account/your-products/trial-product-versions/download-trial-file.aspx?fileid=11861&pid=0&dispkey=True
I've running Win7 64bit, IE 8, & VS 2010, and running in IIS Express.