Hello,
I have a grid that I would like to work with an html form.
Right now the form an grid work just fine. What i am trying to do is pass parameters to the method that runs the actual query. When I add in the parameters that is when the issue arises, instead of the results going back into the grid i get a page of json results. Any help would be greatly appreciated.
@(Html.Kendo().Grid<MVCPROJECT.ViewModels.FormViewModel>()
.Name("SearchResultsGrid")
.Columns(columns =>
{
columns.Bound(c => c.FirstName).Width(120).Filterable(ftb => ftb.Multi(true));
columns.Bound(c => c.LastName).Width(120).Filterable(ftb => ftb.Multi(true));
columns.Bound(c => c.Agency).Width(120).Filterable(ftb => ftb.Multi(true));
columns.Bound(c => c.Address1).Width(120).Filterable(ftb => ftb.Multi(true));
columns.Bound(c => c.City).Width(120).Filterable(ftb => ftb.Multi(true));
columns.Bound(c => c.PhoneNumber).Width(130).Filterable(false);
columns.Bound(c => c.ServiceName).Width(150).Filterable(ftb => ftb.Multi(true));
columns.Bound(c => c.ClientType).Width(120).Filterable(ftb => ftb.Multi(true));
})
.NoRecords()
.Mobile()
.Pageable(pager => pager.PageSizes(new int[] { 10, 20, 50 }))
.Sortable()
.Filterable()
.Pageable(pager => pager.ButtonCount(5))
.Scrollable()
.Navigatable()
.HtmlAttributes(new { style = "height:550px;font-size:12px" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("SearchResults", "ProviderSearch"))
))
public ActionResult SearchResults([DataSourceRequest]DataSourceRequest request, string ClientType, int? ZipCode, int? Distance, string County, string[] ProviderServices)
{
return Json(GetSearchResults(ClientType).ToDataSourceResult(request));
}