1
Help for ParamQuery Pro / frozenCols error
« on: December 27, 2022, 08:10:09 am »
Hello master
In the source code below, if you scroll up and down a lot, the checkbox is not selected.
$(function () {
var columns = [
{ dataIndx: "state", maxWidth: 30, minWidth: 30, align: "center", resizable: false,
title: "",
menuIcon: false,
type: 'checkBoxSelection', cls: 'ui-state-default', sortable: false, editor: false,
dataType: 'bool',
cb: {
all: false, //checkbox selection in the header affect current page only.
header: true //show checkbox in header.
}
},
{ title: "Order ID", dataIndx: "OrderID" },
{ title: "Customer Name", dataIndx: "CustomerName" },
{ title: "Product Name", dataIndx: "ProductName" },
{ title: "Unit Price", dataIndx: "UnitPrice", dataType: 'float', format: '$#,###.00' },
{ title: "Quantity", dataIndx: "Quantity", dataType: 'integer' },
{ title: "Order Date", dataIndx: "OrderDate" },
{ title: "Required Date", dataIndx: "RequiredDate" },
{ title: "Shipped Date", dataIndx: "ShippedDate" },
{ title: "ShipCountry", dataIndx: "ShipCountry" },
{ title: "Freight", align: "right", dataIndx: "Freight" },
{ title: "Shipping Name", dataIndx: "ShipName" },
{ title: "Shipping Address", dataIndx: "ShipAddress" },
{ title: "Shipping City", dataIndx: "ShipCity" },
{ title: "Shipping Region", dataIndx: "ShipRegion" },
{ title: "Shipping Postal Code", dataIndx: "ShipPostalCode", minWidth: 150 }
];
var dataModel = {
location: "remote",
dataType: "JSON",
method: "GET",
url: "/Content/invoice.json"
}
var $grid = $("div#grid_freeze_columns").pqGrid({
height: 500,
autoRow: true,
dataModel: dataModel,
create: function () {
this.flex();
},
pageModel: { type: 'local', rPP: 20, rPPOptions: [1, 10, 20, 30, 40, 50, 100] },
colModel: columns,
menuIcon: true,
menuUI: {
tabs: ['hideCols']
},
freezeCols: 5,
numberCell: { resizable: true, width: 40, title: "#", minWidth: 25 },
title: "Shipping Orders",
resizable: true
});
});
In the source code below, if you scroll up and down a lot, the checkbox is not selected.
$(function () {
var columns = [
{ dataIndx: "state", maxWidth: 30, minWidth: 30, align: "center", resizable: false,
title: "",
menuIcon: false,
type: 'checkBoxSelection', cls: 'ui-state-default', sortable: false, editor: false,
dataType: 'bool',
cb: {
all: false, //checkbox selection in the header affect current page only.
header: true //show checkbox in header.
}
},
{ title: "Order ID", dataIndx: "OrderID" },
{ title: "Customer Name", dataIndx: "CustomerName" },
{ title: "Product Name", dataIndx: "ProductName" },
{ title: "Unit Price", dataIndx: "UnitPrice", dataType: 'float', format: '$#,###.00' },
{ title: "Quantity", dataIndx: "Quantity", dataType: 'integer' },
{ title: "Order Date", dataIndx: "OrderDate" },
{ title: "Required Date", dataIndx: "RequiredDate" },
{ title: "Shipped Date", dataIndx: "ShippedDate" },
{ title: "ShipCountry", dataIndx: "ShipCountry" },
{ title: "Freight", align: "right", dataIndx: "Freight" },
{ title: "Shipping Name", dataIndx: "ShipName" },
{ title: "Shipping Address", dataIndx: "ShipAddress" },
{ title: "Shipping City", dataIndx: "ShipCity" },
{ title: "Shipping Region", dataIndx: "ShipRegion" },
{ title: "Shipping Postal Code", dataIndx: "ShipPostalCode", minWidth: 150 }
];
var dataModel = {
location: "remote",
dataType: "JSON",
method: "GET",
url: "/Content/invoice.json"
}
var $grid = $("div#grid_freeze_columns").pqGrid({
height: 500,
autoRow: true,
dataModel: dataModel,
create: function () {
this.flex();
},
pageModel: { type: 'local', rPP: 20, rPPOptions: [1, 10, 20, 30, 40, 50, 100] },
colModel: columns,
menuIcon: true,
menuUI: {
tabs: ['hideCols']
},
freezeCols: 5,
numberCell: { resizable: true, width: 40, title: "#", minWidth: 25 },
title: "Shipping Orders",
resizable: true
});
});