Show Posts

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.


Messages - paramvir

Pages: [1] 2 3 ... 427
2
Help for ParamQuery Pro / Re: Icon in column header
« on: June 18, 2025, 06:40:35 pm »
If you don't want it to be part of title API, then

In refreshHeader event, get a reference to header cell with getCellHeader method

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

and add icon by DOM manipulation.

3
Help for ParamQuery Pro / Re: BootStrap Dropdown not working
« on: May 29, 2025, 06:50:13 pm »
grid cells have overflow: hidden; that's why the dropdown gets clipped.

It can be resolved by:

a) Either add style overflow: visible to the cells containing bootstrap dropdowns.

b) or add data-bs-popper-config='{"strategy":"fixed"}' to data-bs-toggle='dropdown' elements:

jsfiddle with 2nd solution:

https://jsfiddle.net/zyhcok5p/

More discussion about this issue:

https://stackoverflow.com/questions/31829312/bootstrap-dropdown-clipped-by-overflowhidden-container-how-to-change-the-conta

4
Bug Report / Re: Safari 16 and below bug with suggested fix
« on: May 28, 2025, 08:44:13 am »
The original code uses a negative lookbehind

Code: [Select]
fmtPart = fmtPart.replace(/(?<![ap])m{1,5}/gi, replacer("M"));.

The following snippet can be used instead, as it avoids lookbehind by capturing the preceding character:

Code: [Select]
fmtPart = fmtPart.replace(/(^|[^ap])(m{1,5})/gi, (match, prefix, mSequence, offset) => {
     return prefix + replacer('M')(mSequence, offset + prefix.length );
});

5
Please pass the params correctly

Code: [Select]
        grid.updateRow({
            track: false,
            history: false,
            checkEditable: false,
            refresh: true,
            rowList: [{
              rowIndx: ri,
              newRow: res.data
            }]
        });

6
Help for ParamQuery Pro / Re: PHP 7 -> PHP 8
« on: May 15, 2025, 05:27:41 pm »
IS {"data":[{"c":1}} data of host grid or the remote filter options?

Could you share a jsfiddle.

7
Help for ParamQuery Pro / Re: Storing states in database
« 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

8
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

9
count can be added by updating summaryOptions for numbers.

Code: [Select]
summaryOptions: {
number: "avg,max,min,stdev,stdevp,sum,count"
},

10
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.

11
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>

12
The css rule needs to be placed after the css files of pqgrid.

Code: [Select]
<style>
.pq-grid{
  font-family: Arial, sans-serif;
  font-size: 20px;
}
</style>

https://jsfiddle.net/8h7gadys/

13
Please use this patch to fix the RTL issue.

Code: [Select]
    //fix for RTL.
    pq.scrollLeft = (ele, val) => {
        if (val == null) {
            return Math.abs(ele.scrollLeft)
        }
        else {
            val = Math.abs(val);
            if ($(ele).css('direction') == 'rtl') {
                val = -1 * val;
            }
            ele.scrollLeft = val;
        }       
    }
    pq.scrollLeftVal = (ele, val) => Math.abs(val)

Demos in RTL can be viewed by appending rtl to the url.

https://paramquery.com/pro/demos?rtl

14
In v3.3, localization strings for English are included in the grid itself, so no need to include localization file for English.

In Pro version, however you are required to include the localization file as mentioned in the Tutorial section.

https://paramquery.com/pro/tutorial#topic-include

You can refer to the example for dynamically changing the locale here: https://paramquery.com/pro/demos/localize

15
Bug Report / Re: New row comit and pq_detail column
« on: March 25, 2025, 11:20:17 pm »
pq_detail and column with type: "detail" are not the same. pq_detail is a property of the rowData while column of type: 'detail' is used for nesting or row details.

Pages: [1] 2 3 ... 427