Recent Posts

Pages: [1] 2 3 ... 10
1
Help for ParamQuery Pro / Re: Pivot Grid - Default Aggregate function for Columns
« Last post by mlipham on March 21, 2025, 08:08:19 pm »
Awesome - thanks!
I'll keep my eyes peeled for the new version.
2
Bug Report / Re: New row comit and pq_detail column
« Last post by paramvir on March 21, 2025, 11:46:01 am »
I don't understand why you have added pq_detail in the colModel. Can you please clarify?
3
Help for ParamQuery Pro / Re: Using loadState in grouped fields
« Last post by paramvir on March 20, 2025, 06:10:22 pm »
Thanks for mentioning the steps.

Please add this patch to fix the error.

Code: [Select]
jQuery.paramquery.pqGrid.prototype.loadState=function(e){e=e||{};var t,o=this,r=$.widget.extend,d=e.state||o.getState();if(!d)return!1;pq.isStr(d)&&(d=JSON.parse(d));var a,l=d.colModel,i="pid"+Math.random(),n={},s={},p={},h=o.options,M=e=>e.dataIndx||e.id||e.title,c=(delete(a=h.stateColKeys).colModel,delete a.dataIndx,a),f=h.colModel,u=(e,t,o,r)=>{var d=o[t]={};e.forEach(((e,a)=>{var l=M(e);e.parentId=t,r[l]=e,d[l]=a,e.colModel&&u(e.colModel,l,o,r)}))};for(var g in u(l,i,s,n),p[i]={colModel:f},u(f,i,{},p),p){var v=n[g],N=p[g];if(v){if(N.parentId!=v.parentId){var w=p[N.parentId],I=p[v.parentId];I&&(w.colModel.splice(w.colModel.indexOf(N),1),I.colModel.push(N))}o._saveState(v,N,c)}}return function e(t,o){var r=s[o];r&&t.sort((function(e,t){return r[M(e)]-r[M(t)]})),t.forEach((t=>{delete t.parentId;var o=t.colModel||[];o.length&&e(o,M(t))}))}(f,i),o.iCols.init(),r(h.sortModel,d.sortModel),r(h.pageModel,d.pageModel),o.Group().option(d.groupModel,!1),o.Tree().option(d.treeModel,!1),t={freezeRows:d.freezeRows,freezeCols:d.freezeCols},isNaN(1*h.height)||isNaN(1*d.height)||(t.height=d.height),isNaN(1*h.width)||isNaN(1*d.width)||(t.width=d.width),o.option(t),!1!==e.refresh&&o.refreshDataAndView(),!0};
4
Help for ParamQuery Pro / Re: Pivot Grid - Default Aggregate function for Columns
« Last post by paramvir on March 20, 2025, 12:37:59 pm »
I understand that's incorrect behavior of pqgrid pivot to use default aggregate as "sum" for all columns. It would be fixed in upcoming version.

Meanwhile please use this patch to fix it

Code: [Select]
jQuery.paramquery.cToolPanel.prototype.getObj=function(t){var a={},e=this.that;return t.find(".pq-pivot-col").each((function(t,r){var u=r.dataset.di,o=e.getColumn({dataIndx:u}),n=r.getAttribute("type")||o.summaryDefault||e.iGroup.getAggOptions(o.dataType)[0];o.summaryDefault=a[u]=n})),a};

you may remove the custom code in pivotCM event related to it.
5
you have to make few code changes in order to make it work for evaluation copy.

Please refer to the upgrade guides https://paramquery.com/pro/upgrade/Index to find out the required changes in your code.
6
ParamQuery Pro Evaluation Support / Upgrading from free version to evaluation copy
« Last post by Jit on March 20, 2025, 11:53:28 am »
Hello there,
I have been implementing pqGrid free version, to my project.
Free version has been great, but I want to checkout pro version and if it suits my use case then hopefully transition to paid version.

I want to know the required steps , and things to take care before shifting to paid version.

I tried migrating it by following the tutorial, but all of my existing functionality are not working:

What I tried:
Replaced the free version js and css file to paid version (Did no code changes) :
- pqgrid.min.css
- pqgrid.ui.min.css
- pqgrid.min.js
- /localize/pq-localize-en.js

Please let me know if any extra steps are required.
Thank you
7
Help for ParamQuery Pro / Pivot Grid - Default Aggregate function for Columns
« Last post by mlipham on March 20, 2025, 08:50:33 am »
I have a (Pivot) grid with several data types in it – dates, string, and some numbers.


I have been tasked with fixing the behavior where if one drags a date field into the “Aggregates” box (lower right), it automatically assumes “Sum()”.

It can be clicked and changed to a proper aggregate function, like count() or Min/Max, but the default is sum(). As you know, this means the values in the grid appear as NaN or other weird formats.
 

One suggestion I saw was to add summary  type=null to each column definition, which didn't seem to help.


As an alternative, I have some custom .js code that seems to fit the bill – almost. The code below will intercept the ‘drag-in’ and changes it to count() by default – yay! – but the data in the grid still says NaN, as though it ran it as sum(). This leads me to believe I probably need to refresh the grid to register the new change.


So even if I add the refresh, I can’t help wondering – is there a simpler way that I am overlooking? Am I going about this the hard way? Is there a much simpler approach or configuration to achieve the same?


Below please find my code scratchings: (Yes, I also need to add code to handle strings)


( event: pivotCM:  )

Code: [Select]
function (evt, ui) {
   
    //previous code to concat field value to column header

    ...

    //Code to change from sum to count

    ui.CM.forEach(col => {

        if (col.dataType == "date" && col.summary.type == "sum") {

            col.summary.format = "";

            col.summary.type = "count";

        }

        if (col.dataType === "date") {

            if (col.summary.type === "count") {

                col.summary.format = "0";               

            } else {

                col.summary.format = "mm/dd/yy hh:mm:ss";

            }

        }

    });

}


Thanks!
8
Help for ParamQuery Pro / Re: Clear Text Icon in Header Filters
« Last post by paramvir on March 19, 2025, 06:47:41 pm »
Please set filterModel.hideClearIcon to true to disable it.

https://paramquery.com/pro/api#option-filterModel
9
Help for ParamQuery Pro / Clear Text Icon in Header Filters
« Last post by queensgambit9 on March 19, 2025, 05:48:09 pm »
Is the feature "Clear Text Icon in Header Filters" enabled as default in v10.1.0?
How do you disable it?
10
It has nothing to do with jQuery/ jQueryUI but this is how scrollModel.autoFit works for now, the horizontal scrollbar is never displayed with this option.

The feature to display a horizontal scrollbar when column widths reach their minimum and no space remains for scrollModel.autoFit has been reintroduced in the upcoming version.
Pages: [1] 2 3 ... 10