asp.net mvc - jqgrid url not invoking controller action method mvc3 -


i want call controller action jqgrid , used url property of jqgrid, still controller action method not being called....the jqgrid being loaded without data, posting view, can point out going wrong

<link href="../../content/ui.jqgrid.css" rel="stylesheet" type="text/css" /> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/start/jquery-ui.css" rel="stylesheet" type="text/css" /> <link href="../../content/site.css" rel="stylesheet" type="text/css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script> <script src="../../scripts/jquery.validate.min.js" type="text/javascript"></script> <script src="../../scripts/grid.locale-en.js" type="text/javascript"></script> <script src="../../scripts/jquery.jqgrid.min.js" type="text/javascript"></script> <script src="../../scripts/jquery.maskedinput-1.2.2.min.js" type="text/javascript"></script>          $(document).ready(function () {       var updatedialog = {       url: "/contact/update"             , closeafteradd: true             , closeafteredit: true             , aftershowform: function (formid) {                 $("#phonenumber").mask("(999) 999-9999");                 $("#dateofbirth").datepicker();             }             , afterclickpgbuttons: function (whichbutton, formid, rowid) {                 $("#phonenumber").mask("(999) 999-9999");             }             , modal: true              , onclicksubmit: function (params) {                 var ajaxdata = {};                  var list = $("#list");                 var selectedrow = list.getgridparam("selrow");                 rowdata = list.getrowdata(selectedrow);                 ajaxdata = { contactid: rowdata.contactid };                  return ajaxdata;             }              , width: "400"      };      $.jgrid.nav.addtext = "add";      $.jgrid.nav.edittext = "edit";      $.jgrid.nav.deltext = "delete";      $.jgrid.edit.addcaption = "add contact";      $.jgrid.edit.editcaption = "edit contact";      $.jgrid.del.caption = "delete contact";      $.jgrid.del.msg = "delete selected contact?";      $("#list").jqgrid({          url: "/list/contact/",          datatype: 'json',          mtype: 'get',          colnames: ['contactid', 'name', 'date of birth', 'e-mail', 'phone number', 'married'],          colmodel: [                 { name: 'contactid', index: 'contactid', width: 40, align: 'left', /* key: true,*/editable: true, editrules: { edithidden: false }, hidedlg: true, hidden: true },                 { name: 'name', index: 'name', width: 300, align: 'left', editable: true, edittype: 'text', editrules: { required: true }, formoptions: { elmsuffix: ' *'} },                 { name: 'dateofbirth', index: 'dateofbirth', width: 200, align: 'left', formatter: 'date', datefmt: 'm/d/y', editable: true, edittype: 'text', editrules: { required: true, date: true }, formoptions: { elmsuffix: ' *'} },                 { name: 'email', index: 'email', width: 200, align: 'left', formatter: 'mail', editable: true, edittype: 'text', editrules: { required: true, email: true }, formoptions: { elmsuffix: ' *'} },                 { name: 'phonenumber', index: 'phonenumber', width: 200, align: 'left', editable: true, edittype: 'text', editrules: { required: true, custom: true, custom_func: isvalidphone }, formoptions: { elmsuffix: ' *'} },                 { name: 'ismarried', index: 'ismarried', width: 200, align: 'left', editable: true, edittype: 'checkbox', editoptions: { value: "true:false" }, editrules: { required: true}}],          pager: $('#listpager'),          rownum: 1000,          rowlist: [1000],          sortname: 'contactid',          sortorder: "desc",          viewrecords: true,          imgpath: '/content/themes/redmond/images',          caption: 'contact list',          autowidth: true,          ondblclickrow: function (rowid, irow, icol, e) {              $("#list").editgridrow(rowid, prmgriddialog);          }      }).navgrid('#listpager',             {                 edit: true, add: true, del: true, search: false, refresh: true             },             updatedialog,             updatedialog,             updatedialog         );  });        </script>  //my action method  public actionresult update(contactviewmodel viewmodel, formcollection formcollection) {  return content(repository.haserrors.tostring().tolower());   } 


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -