Recent Posts

Pages: 1 2 3 [4] 5 6 ... 10
31
Help for ParamQuery Pro / Re: Storing states in database
« Last post by paramvir on May 13, 2025, 08:05:26 pm »
There is no demo for saving it in db as the process also involves user authentication to tie / associate the state with the user.

If you have user authentication already in place, then the process is quite simple:

first receive the state as string with saveState method and pass save: false to the method so as to avoid saving it to localStorage.

post the state string to remote url along with user token id and save it in a single field corresponding to the user in a table.

Get the state corresponding to the user whenever required and use loadState method to restore the state of the grid.

https://paramquery.com/pro/api#method-saveState

https://paramquery.com/pro/api#method-loadState
32
Help for ParamQuery Pro / Storing states in database
« Last post by queensgambit9 on May 13, 2025, 01:16:55 pm »
Hi

I am currently using states (localstorage). Is there a tutorial or example on how to instead store in database along with user data. Using MySQL/PHP.

Thanks in advance.
33
Bug Report / Bugs in format for dates with times in a tree
« Last post by jplevene on May 03, 2025, 10:20:13 pm »
I spotted two bugs, but only if pqGrid is a treeModel
  • "mm/dd/yyyy" does not work, I have to use "mm//dd/yyyy" (notice the double "//" to get a single one to show)
  • "mm//dd/yyy hh:mm" does not work as documented, it shows the month instead of the minutes.

In one of the demos on the pqGrid v10 demo page I set "format" and/or "fmtDateFilter"
34
Sorry for late reply.

It can be done in beforeValidate, check if ui.source == 'paste' and there are objects of type: 'add' in ui.rowList, then remove them.

https://paramquery.com/api#event-beforeValidate
35
Help for ParamQuery Pro / Re: Pivot Grid - Default Aggregate function for Columns
« Last post by mlipham on April 28, 2025, 09:34:59 pm »
Ah! Lovely - thank you sir!
36
Help for ParamQuery Pro / Re: Pivot Grid - Default Aggregate function for Columns
« Last post by paramvir on April 28, 2025, 09:13:52 pm »
count can be added by updating summaryOptions for numbers.

Code: [Select]
summaryOptions: {
number: "avg,max,min,stdev,stdevp,sum,count"
},
37
Help for ParamQuery Pro / Re: Pivot Grid - Default Aggregate function for Columns
« Last post by mlipham on April 28, 2025, 08:09:55 pm »
Yes - you are correct. After further analysis, I understand my ticket a little better - apologies.
And yes, the example behavior seems to match what I am seeing in our development.

Allow me to ask a follow-up.

The example https://paramquery.com/pro/demos/pivot has Gold in the aggregates box (lower right), along with Silver bronze and total.

After re-reading my (internal) request again, I think the question is - why is count not available for the number types?
Is that something I can code to add into the list of aggregate choices for numbers?

Many thanks as always!

38
Help for ParamQuery Pro / Re: Pivot Grid - Default Aggregate function for Columns
« Last post by paramvir on April 27, 2025, 10:18:43 pm »
I don't see the mentioned side effect in this patched example: https://paramquery.com/pro/demos/pivot

Athlete is string datatype column and it defaults to "count" when dropped to aggregates pane, I can still see the count option in the dropdown list of available options for that dataType.

Available options for a dataType in aggregate pane are picked from summaryOptions: https://paramquery.com/pro/api#option-summaryOptions

Have you updated the summaryOptions dynamically somewhere in your code? It could be causing the side effect.
39
Help for ParamQuery Pro / Re: Pivot Grid - Default Aggregate function for Columns
« Last post by mlipham on April 26, 2025, 01:56:37 am »
The patch works great , but now i have a weird side effect(?).

We have a mix of data types that can be dragged into the aggregate section.
And now with this code - dragging in a string defaults to count() - awesome.
However, if I click on it again to change the aggregate function, 'count' is no longer a choice - it is simply missing.
This means that if I changed to say, 'sum', or 'avg', then wanted to return to 'count', I no longer have that choice in the menu.

Any hints?

thanks again!
40
Help for ParamQuery Pro / Re: Changing the font size of everything in the grid
« Last post by paramvir on April 16, 2025, 08:34:00 pm »
There might be other css rules on the page that can affect it.

Either you find and resolve those rules or override other rules by adding !important to the affected css rule.

Code: [Select]
<style>
.pq-grid{
  font-family: Arial, sans-serif !important;
  font-size: 20px !important;
}
</style>
Pages: 1 2 3 [4] 5 6 ... 10