I am using NonFactors.MVC.Grid and implementing Pagination, It is not working with HttpPost and I want to use it for Search with Post request. Pagination does not work.
Here is the code:
@model FormModel
Html.Grid(Model)
.Build(columns =>
{
columns.Add(model => model.P1).Titled("P1").
UsingDefaultFilterMethod("equals").AppendCss("sticky-col first-col");
columns.Add(model => model.P2).Titled("P2").
UsingDefaultFilterMethod("equals").AppendCss("sticky-col second-col");
})
.Empty("No data found")
.Pageable(pager =>
{
pager.RowsPerPage = 10;
})
.Filterable()
// Enables single filtering for not explicitly configured property expression columns.
.Sortable()
)
[HttpPost]
public ActionResult SearchResults(FormModel model)
{
IQueryable<Model1>? data=//get data from database.
return View(data);
}