This question is locked. New answers and comments are not allowed.
Hello,
I have a grid that gets data from a WCF Service. When I'm trying to do paging, I'd like to pass the whole model back into the _Paging ActionResult so that I can post to the WCF Service again and bring back the data. Is this possible? How else can I get the values I need to pass to the WCF Service? As for now the objRequest parameter inside the _Paging method is null.
Here's my view:
Here's my controller:
I have a grid that gets data from a WCF Service. When I'm trying to do paging, I'd like to pass the whole model back into the _Paging ActionResult so that I can post to the WCF Service again and bring back the data. Is this possible? How else can I get the values I need to pass to the WCF Service? As for now the objRequest parameter inside the _Paging method is null.
Here's my view:
Html.Telerik().Grid(Model.objGetEventSchedule_Response.EventSchedules.ToList()).Name("Grid").Pageable().Sortable().Columns(columns =>{ columns.Bound(o => o.MasterScheduleID); columns.Bound(o => o.EventScheduleID); columns.Bound(o => o.EventDatetime); columns.Bound(o => o.EventType); columns.Bound(o => o.CustomerID); columns.Bound(o => o.CREATEDDATE); columns.Bound(o => o.LAST_UPDATE_TS); columns.Bound(o => o.UPDATE_BY);}) .DataBinding(dataBinding => dataBinding.Ajax().Select("_Paging", "GetEventScheduleRequest")).Pageable(paging => paging.Style(pagerStyles).Position(position).PageTo(currentPage)).Render();Here's my controller:
[GridAction]public ActionResult _Paging(CombinedGetEventSchedule objRequest){ var objList = new List<CombinedGetEventSchedule>(); objList.Add(GetData(objRequest)); IEnumerable<CombinedGetEventSchedule> objCombined; objCombined = objList; return View(new GridModel<CombinedGetEventSchedule> { Data = objCombined }); }