1: CREATE a database TABLE and insert 200000 data records to it: copy the code create table [dbo]. [T_School] ([ID] [int] IDENTITY (255) not null, [SchoolName] [nvarchar] () COLLATE Chinese_PRC_CI_AS NULL, [BuildDate] [datetime] NULL, [Address] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL, [IsSenior] [bit] NULL, [StudentNum] [int] NULL, CONSTRAINT [PK_T_School] primary key clustered ([ID] ASC) WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY] Copy Code 2: myJqgrid. jqGird code encapsulated by js: Copy code/** it is better to display 20 columns by default * List ID = "gridTable" list url = 'handler. ashx? Action = page 'list datatype = 'json' list colNames = ['id', "name", 'Gender ', 'cell phone', 'mailbox '] list colModel =... List title caption = "User List" list modification URL editurl = "Handler. ashx? Action = cursor "sortname =" ID "by default in the list; Page ID gridPagerID =" gridPager "* // The last selected row var lastsel; function myJqGrid (id, url, datatype, colNames, colModel, caption, editurl, sortname, gridPagerID) {var myGrid =$ ("#" + id); myGrid. jqGrid ({url: url, datastr: "data. json ", datatype: datatype, rowNum: 20, rowList: [10, 20, 50], colNames: colNames, colModel: colModel, jsonReader: {repeatitems: false, root: fun Ction (obj) {return obj. rows;}, page: function (obj) {return obj. pageindex;}, total: function (obj) {return obj. pagecount;}, records: function (obj) {return obj. total ;}}, prmNames: {page: 'pageindex', rows: 'pagesize', sort: 'order', Order: 'sort '}, hidegrid: false, rownumbers: true, loadonce: false, sortname: sortname, sortorder: 'desc', pager: "#" + gridPagerID, viewrecords: true, cap Tion: caption, toolbar: [true, "top"], altRows: true, // the last row selected onSelectRow: function (id) {if (id & id! = Lastsel) {grid. jqGrid ('restorerow', lastsel); lastsel = grid. jqGrid ('getrowdata', id) [sortname] ;}}, editurl: editurl});} pay attention to the parameters in the two parts of the Code, pagecount-json indicates the total number of pages, total-json indicates the total number of data rows, and pageindex-json indicates the data of the current page number; prmNames is the name of the paging parameter that is renamed to the backend. The URL uploaded to the backend is GET/CountryHandler. ashx? _ Search = false & nd = 1397394772871 & PageSize = 20 & PageIndex = 1 & Order = ID & Sort = desc copy code jsonReader: {repeatitems: false, root: function (obj) {return obj. rows;}, page: function (obj) {return obj. pageindex;}, total: function (obj) {return obj. pagecount;}, records: function (obj) {return obj. total ;}}, prmNames: {page: 'pageindex', rows: 'pagesize', sort: 'order', Order: 'sort '}, copy code 3: html code and JS Code: Copy the Code