flynny
asked on
using jqgrid with MVC 5 Controller
Hi All,
I'm trying to get jqgrid to working with a mvc controller.
However its not finding the controller method. Can anyone tell me why? I have the following code;
and in the controller
Thanks in advance,
Matt.
I'm trying to get jqgrid to working with a mvc controller.
However its not finding the controller method. Can anyone tell me why? I have the following code;
jQuery("#jqgrid").jqGrid({
url: '@Url.Action("GetAdminUser", "User")',
editurl: '@Url.Action("EditAdminUser", "User")',
deleteurl: '@Url.Action("DeleteAdminUser","User")',
....
and in the controller
[AcceptVerbs(HttpVerbs.Post)]
public JsonResult GetAdminUser()
{
using (var dataContext = new DBDataContext())
{
var userRepository = new Repository<AdminUser>(dataContext);
var allUsers = userRepository.GetAll().ToList();
return Json(allUsers);
}
}
Thanks in advance,
Matt.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.