jqueryjqgrid

Jqgrid 4.5 virtaul scrolling not sending request on scroll down


I am using Jqgrid 4.5. My grid binds well on page load using javascript. i enable virtual scrolling but when i scroll down the page is not making new request to the server. inface its doing nothing. just stick with the record which comes on page load. i dont know where i am going wrong i used every solution found on the net but not able to work. My codefor binding JqGrid is:

jQuery("#list2").jqGrid(
        {
            url: '../ReportsLoadService.asmx/GetPublishHistory',
            datatype: "json",
            ajaxGridOptions: { contentType: "application/json" },
            mtype: "POST",
            postData:
            {
                //Sortby: Sortby,
                    //sidx: sidx,
                    //page: page,
                    //rows: rows,
                PostProfileId: PostProfileId,
                startdate: startdate,
                starttime: starttime,
                enddate: enddate,
                endtime: endtime,
                ServiceName: ServiceName,
                Url: Url,
                UrlTitle: UrlTitle,
                Status: Status,
                DateOption: DateOption
            },
            serializeGridData: function(data) {
                return JSON.stringify(data);
            },
            colNames: [
                'Service Name', 'Title', 'Schedule Date', 'Status', 'Posting Error'
            ],
            colModel: [
                {
                    name: 'ServiceName',
                    index: 'ServiceName',
                    resizable: false
                },
                {
                    name: 'Title',
                    index: 'Title',
                    formatter: 'showlink',
                    formatoptions: { baseLinkUrl: 'Url', addParam: '', idName: '' },
                    resizable: false
                },
                {
                    name: 'ScheduleDate',
                    index: 'ScheduleDate',
                    align: 'center',
                    resizable: false
                },
                {
                    name: 'Status',
                    index: 'amount',
                    resizable: false
                },
                {
                    name: 'PostingError',
                    index: 'PostingError',
                    resizable: false
                }
            ],

            jsonReader: {
                root: "d.Records",
                page: "d.CurrentPage",
                //records: "d.TotalRecords",
                repeatitems: false
            },
            rowNum: 50,
            rownumbers: true,
            //rowList: [20, 30, 50],
            //sortname: "Title",
            //rowTotal: 2000,
            pager: '#pager2',

            viewrecords: true,
            sortorder: "desc",
            //height: "100%",
            //autowidth: true,
            scroll: 1,
            loadonce: false,
            gridview: true,
            prmNames: { npage: 1 }
        });

point me where i am doing wrong because my requirements need virtual scrolling and i am not able make it work.


Solution

  • I solved it my self i was setting wrong paging option in jqgrid that's why its creating problem. Now its working fine.