1
Help for ParamQuery Pro / Re: Column filter on remote source override
« on: July 15, 2025, 02:30:20 am »
It doesn't work. "return false" does not prevent the remote data call or even passing the parameters to the remote data call
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
render: function(ui){
return {
text: ui["cellData"], // This is not needed, included here for clarity
attr: 'title="'+ui["cellData"].replace('"',""")+'"'
}
}
new ResizeObserver(function(){ setTimeout(function(){ grid_resize(); }, 100); }).observe( $("#grid")[0] );
...
function grid_resize()
{
if($("#grid").is(":visible"))
{
// Do we add horizontal scroll
var width = 0;
$("#grid").pqGrid("Columns").each(function(col){
if(!col.hidden)
width += intval(col["width"]);
});
// Do we hide or show the scroll bar
$("#grid").pqGrid("option", "scrollModel", {autoFit:width<$("#grid").width() ? true : false});
}
}
new ResizeObserver(function(){ grid_resize(); }).observe( grid );
grid_resize()
{
if(grid && grid.is(":visible"))
{
// Do we add horizontal scroll
var width = 0;
grid.pqGrid("Columns").each(function(col){
if(!col.hidden)
width += intval(col["width"]);
});
// Do we hide or show the scroll bar
grid.pqGrid("option", "scrollModel", {autoFit:width<grid.width() ? true : false});
}
}
grid.one("load", function (evt, ui) {
// Apply initial filtering.
grid.filter({
oper: "add",
rules: [
{ dataIndx: "DEPOT", value: ["London"] },
]
});
});
(function($) {
var fn = $.paramquery._pqGrid.prototype;
fn.showLoading = function() {
if(this.$grid_center.is(":visible"))
{
this.loading = true;
open_loading_overlay();
}
};
fn.hideLoading = function() {
this.loading = false;
close_loading_overlay();
};
})(jQuery);
var cVirtual = window.pq.cVirtual.prototype;
cVirtual.calcTopBottom = function(left) {
console.log("calcTopBottom");
// Call the old
return cVirtual.calcTopBottom(left);
};
cVirtual.getTop = function(ri, actual) {
console.log("getTop");
// Call the old
return cVirtual.getTop(ri, actual);
};
cVirtual.getLeft = function(ci, actual) {
console.log("getLeft");
// Call the old
return cVirtual.getLeft(ci, actual);
};
cVirtual.getHeightR = function(ri, rows) {
console.log("getHeightR");
// Call the old
return cVirtual.getHeightR(ri, rows);
};
cVirtual.calInitFinal = function(top, bottom, left) {
console.log("calInitFinal");
// Call the old
return cVirtual.calInitFinal(top, bottom, left);
};