This question is locked. New answers and comments are not allowed.
Hi,
I saw some posts about this problem but i could not find a solution.
I downloaded the package library "Telerik Mvc package" from VS10 because I wanted to test the controls to see how they work, first thing I wanted to try was to do the ajax databinding i copied the code from the telerik help and i got a view that look like that
I saw some posts about this problem but i could not find a solution.
I downloaded the package library "Telerik Mvc package" from VS10 because I wanted to test the controls to see how they work, first thing I wanted to try was to do the ajax databinding i copied the code from the telerik help and i got a view that look like that
@model IEnumerable<MvcMovie.Models.Movie> @(Html.Telerik().Grid<MvcMovie.Models.Movie>(Model) .Name("grdMovie") .Columns( columns => { columns.Bound(o => o.Title).Width(100); columns.Bound(o => o.Genre).Width(200); } ) .DataBinding(dataBinding => dataBinding //Ajax binding .Ajax() //The action method which will return JSON .Select("_AjaxBinding", "Home") ) .Sortable() )
and my controller
namespace MvcMovie.Controllers { public partial class HomeController : Controller { private MovieDbContext db = new MovieDbContext(); public ActionResult Index() { var _movie = db.Movies; return View(_movie); } //Used for the Ajax binding [GridAction] public ActionResult _AjaxBinding() { return View(new GridModel(db.Movies.ToList())); } }}
Ok now I debug the project, when the page loads the function that i called is the Index, and even if i try to sort columns or i click the refresh button, the AjaxBinding actionresult is never called.
What am I doing wrong? thank you very much
Raphael
