This question is locked. New answers and comments are not allowed.
I'm using the a custom binding grid in a View. The model contains some values to filter the data of the grid. The problem is that I can't get the value in the Ajax Controller of the Custom Binding Grid.
Here is part of the code:
View:
Controller:
The value of model parameters is always null. Could anybody tell what is the way to get this.
Thank you very much.
Juan
Here is part of the code:
View:
<%=Html.Telerik().Grid<tfnGetAllMastersCountriesResult>() .Name("Grid") .Columns(columns => { columns.Bound(o => o.Code).Width(100); columns.Bound(o => o.ISO3Code).Width(100); columns.Bound(o => o.CDH).Width(100); columns.Bound(o => o.Description).Width(400); columns.Bound(o => o.DisabledDate).Width(100); columns.Bound(o => o.Id) .ClientTemplate( "<input type='button' value='Edit' onclick='updateRecord(\"<#= Id#>\")' />") .Title("Commands"); } ) .DataBinding(dataBinding => dataBinding.Ajax() .Select("AjaxGrid", "Countries", new { model = Model } ) ) .Pageable(settings => settings .PageSize(Model.PageSize) .Total(Model.Total) .PageTo(Model.Page) ) .EnableCustomBinding(true) .Sortable() .Filterable() .Scrollable() %>Controller:
[GridAction(EnableCustomBinding = true)] public ActionResult AjaxGrid(GridCommand command, ViewModelCountries model) { return Json(new GridModel { Data = GetModels(command), Total = _repository.Count }); }The value of model parameters is always null. Could anybody tell what is the way to get this.
Thank you very much.
Juan