ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: luckduck on February 09, 2026, 02:27:42 pm
-
Hello,
I have two questions regarding pqGrid version 11:
1. In the colModel of pqGrid v11, when valign: "center" is set, the text is aligned to the left-middle.
Even if align: "center" is also set, the horizontal alignment remains left and does not change.
Is this the intended behavior in v11, or is it a bug?
2. In pqGrid v11, when pasting data copied from Excel that contains merged cells, the data is not pasted into the correct positions.
In versions up to pqGrid v10, even though merged cells were not preserved, the data was correctly inserted based on the merged cell’s reference position.
Has this behavior changed in v11?
Thank you.
-
Thanks for your questions.
1) It's a bug
Please add this css to fix it
.pq-grid-cell > div{
flex-grow:1;
}
2. Could you please provide more details with an example.
-
"Please see the example below regarding question number 2."
-
Thank you for the details, I'm looking into it.
-
Please apply the following patch to resolve the merged-cells copy–paste issue until the next version is released.
pq.extractCells=function(t){let l=t.match(/<style>([\s\S]*?)<\/style>/),e=l?l[1].replace(/(<!--|-->)/,""):"",a={};e.replace(/\.([^\s{]+)\s*{([^}]*)}/g,((t,l,e)=>{a[l]=e.trim()}));let s=[];return[...t.matchAll(/<tr(.*?)>(.*?)<\/tr>/gs)].forEach(((t,l)=>{let e=t[2];s[l]||(s[l]=[]);let r=0;[...e.matchAll(/<td(.*?)>(.*?)<\/td>/gs)].forEach((t=>{for(;s[l][r];)r++;let e=t[1],c=t[2],n=e.match(/colspan=["']?(\d+)["']?/i),o=e.match(/rowspan=["']?(\d+)["']?/i),p=n?parseInt(n[1],10):1,h=o?parseInt(o[1],10):1,m=e.match(/style=(['"])(.*?)\1/),f=(m?.[2]||"").replace(/"/g,'"'),y=e.match(/class=(["'])([^"'<>]+)\1|class=([^\s<>]+)/),i=y?y[2]||y[3]:null,u=i&&a[i]?a[i]:null,d=pq.parseStyle([f,u].join(";"));for(let t=0;t<h;t++)for(let e=0;e<p;e++){let a=l+t,n=r+e;s[a]||(s[a]=[]),s[a][n]=0===t&&0===e?{val:c,style:d}:{val:"",style:d}}r++}))})),s};
Include this snippet anywhere after the pqGrid JavaScript file.
Please let me know if you have any questions or need further assistance.
-
I've applied the code you provided, and I can confirm that both issues are now resolved. Thank you