1.引入js,css
2,基本配置
function init() {
$("#list1").jqGrid({
url: "../Listing.ashx",
datatype: "json", //返回值类型
mtype: "post", //请求类型
colNames: ["编号", "产品名称", "描述", "价格"],
colModel: [
{ name: "ProductID", width: 100 },
{ name: "Name", width: 150 },
{ name: "Description", width: 200, align: "right" },
{ name: "Price", width: 80, align: "right" }, ],
caption: "My first grid"
});
}