Код: Выделить всё
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 }
});
Подробнее здесь: https://stackoverflow.com/questions/201 ... croll-down