This question is locked. New answers and comments are not allowed.
UPDATE:
When I went back to it, the binding is all working now. The only thing left is returning the result back to the view.
ORIGINAL QUESTION:
I believe that SendState should some how get the following CustomCommand to send a GridCommand to my Action, but binding does not seem to sort it out. Am I doing something wrong?
Also, in the examples I saw, the Action returns a JSONResult. Is it possible to return a GridModel so that the view will rerender it?
When I went back to it, the binding is all working now. The only thing left is returning the result back to the view.
ORIGINAL QUESTION:
I believe that SendState should some how get the following CustomCommand to send a GridCommand to my Action, but binding does not seem to sort it out. Am I doing something wrong?
Also, in the examples I saw, the Action returns a JSONResult. Is it possible to return a GridModel so that the view will rerender it?
// This is the Custom Column Command I am trying to wire upcolumns.Bound(v => v.IsDeleted).Title("Deleted").Width(100);columns.Command(commands =>{ commands.Custom("delete") .Text("Delete") .SendState(true) .DataRouteValues(route => route.Add(v => v.Id).RouteKey("id")) .Ajax(true) .Action("Delete", "Victim") .ButtonType(GridButtonType.Image);}// This is the Controller Action that should consume the callpublic ActionResult Delete(int id, GridCommand command){ // delete the item return _Index(command);}// This is my working ajax Action which I want to recall to return a refreshed view[GridAction(EnableCustomBinding = true)]public ActionResult _Index(GridCommand command){ var request = new GetPagedListItemsRequest { User = System.Web.HttpContext.Current.User, Command = command }; var getPagedListItemsResponse = _myService.GetPagedListItems(request); var data = getPagedListItemsResponse.PagedList; return View(new GridModel { Data = data, Total = getPagedListItemsResponse.Count });}