Hi i have a jqgrid that is loading from a "Client" controller's result ("/Clients/GetClients"),
which is loading correctly.
Now this is all within a partial page and what i would like to do is to allow the user to search for a particular client and have those results contained withing a model result and used to filter.
At the moment i am basically using the session data to store this until this URL is called "/Clients/GetClients" then the controller filters the results. But is there a way to pass this model data directly into the jqGrid's URL so that i do no not have to use the session data? If not then that is fine, or if there is a better way to do this then please feel free to comment.
hope it makes sense :)
this.client_grid = $("#client_grid").jqGrid(
{
url: "/Clients/GetClients",
datatype: "json",
mtype: "POST",
height: 250,
colNames: ['Name', 'Description', 'Company', 'Address', 'Phone', 'Email', 'Date Created'],
colModel: [
{ name: 'Name', index: 'Name', width: 200, align: "left", sortable: false },
{ name: 'Description', index: 'Description', width: 100, align: "left", sortable: false },
{ name: 'Company', index: 'Company', width: 100, align: "left", sortable: false },
{ name: 'Address', index: 'Address', width: 100, align: "left", sortable: false },
{ name: 'Phone', index: 'Phone', width: 70, align: "left", sortable: false },
{ name: 'Email', index: 'Email', width: 100, align: "left", sortable: false },
{ name: 'Created', index: 'Created', width: 90, align: "left", sortable: false }
],
caption: "Clients",
pager: this.client_pager
})
[HttpPost]
public JsonResult GetClients(JqGridRequest request)
{
ClientsModel model = null;
model = new ClientsModel(request);
return Json(model);
}