I am using JQGrid in ASP.NET MVC and initializing the grid in document ready as below
jQuery("#grid1").jqGrid({
colNames: ['Col1', 'Col2'],
colModel: [
{ name: 'Col1', index: 'Col1', width: 2, sortable: false },
{ name: 'Col2', index: 'Col2', width: 2, sortable: false }
],
onSelectRow: function (currid) {
},
autowidth: true,
shrinkToFit: false,
height: '100',
width: '100%',
rowNum: 2,
pgtext: "",
pgbuttons: false,
viewrecords: true,
imgpath: '@Url.Content("~/Content/images/jqgrid/")',
toolbar: false,
gridComplete: function () {
$("tr.jqgrow:odd").css("background", "#DDDDDC");
}
});
when the ready is fired and at end it does a server call to default page action as below
controller/action?_search=false&nd=1375859081229&rows=2&page=1&sidx=&sord=asc
I have replaced the controller and action name in the above url.
why is this behavior happening? and how to avoid this behavior?