Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using JQGrid in ASP.NET MVC and initializing the grid in document ready as below

JavaScript
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) {
        //doing some thing
    },
    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?
Posted
Updated 26-Aug-13 19:49pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900