Hi,
I am remotely consuming a grid hosed in an MVC application. For the most part I have got it working as I am using template fields for the allot of things.
I am parsing some of the elements in a method that calls to controller which renders the grid as a partial view. I then spit this out into a literal control in an aspx page.
I need to be able to get the pager functionality calling the ajax data source with an absolute url rather than the relative one it currently uses.
so this is my data source action
below is the ajax datasource configuration
I was looking at the Url method on the CrudOperationBuilder but unsure how to use this properly.
Thanks
David
I am remotely consuming a grid hosed in an MVC application. For the most part I have got it working as I am using template fields for the allot of things.
I am parsing some of the elements in a method that calls to controller which renders the grid as a partial view. I then spit this out into a literal control in an aspx page.
I need to be able to get the pager functionality calling the ajax data source with an absolute url rather than the relative one it currently uses.
so this is my data source action
[AllowCrossSite]
public
ActionResult FallsDataSource([DataSourceRequest] DataSourceRequest request,
string
casenote)
{
IList<FallsAssessEventDTO> events = bedmanEvents.GetEvents(casenote, BedmanEventType.FallsRiskAssessment).Cast<FallsAssessEventDTO>().ToList();
var model = events.Select(e => (FallsAssessment)e).ToList();
AddImages(model);
var queryable = model.AsQueryable();
return
Json(model.ToDataSourceResult(request));
}
datasource.Ajax().Read(read => read.Url("http://" + Request.Url.Host).Action("FallsDataSource", "FallsAssessment", new { Casenote = ViewBag.Casenote }))).Pageable()
I was looking at the Url method on the CrudOperationBuilder but unsure how to use this properly.
Thanks
David