Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Help for ParamQuery Pro / Re: Icon in column header
« Last post by paramvir on June 19, 2025, 07:31:32 pm »
Code example of adding icon using DOM manipulation:

Code: [Select]
refreshHeader: function(evt, ui) {
var $headerCell = this.getCellHeader({ colIndx: 0 });
var $title = $headerCell.find('.pq-title-span');
// Prevent duplicate icons
if ($headerCell.find('.ui-icon-disk').length === 0) {
$("<span class='ui-icon ui-icon-disk'></span>").insertAfter($title);
}
},
12
Help for ParamQuery Pro / Re: Icon in column header
« Last post by paramvir on June 19, 2025, 07:15:04 pm »
Another method:

Add class to the header cell:

Code: [Select]
{ title: "ShipCountry", width: 100, dataIndx: "ShipCountry", clsHead: 'icon-class' },

Use css ::before or ::after pseduo-element

Code: [Select]
<style>
.icon-class .pq-title-span::after{
  display: inline-block;
  font-family: bootstrap-icons !important; 
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size:14px; 
  content: "\f214"; /* Unicode for calendar icon in Bootstrap Icons, replace with ucincode of your choice */
margin-left: 10px;
}
</style>

or use emoji

Code: [Select]
.icon-class .pq-title-span::after{
  content: "✂️";
  margin-right: 5px;
}
13
Help for ParamQuery Pro / Re: Icon in column header
« Last post by queensgambit9 on June 19, 2025, 07:02:10 pm »
Thanks, I got this:

Code: [Select]
refreshHeader: function(event, ui) {
                var $cell = this.getCellHeader( { colIndx: 0 } );
                $cell[0].append("<div></div>");   
            }

But the div is not inserted correctly...
14
1st issue:

ParamQuery Pro supports xlsx format only, so please ensure to name the file with xlsx extension while downloading the file.


2nd issue:

Please add this refresh event in the grid initialization object. It would ensure to clear all the merged cells except the 1st cell in merged cell range, whenever any range of cells is merged in ParamQuery grid.

Code: [Select]
                refresh(){                   
                    var mc = this.options.mergeCells,
                        mcLast = mc.at(-1);
                    if( mcLast ){
                        //debugger;
                        let {r1, c1, r2, c2, rc, cc, cleared} = mcLast,
                            count = rc * cc;
                        if(count > 1 && !cleared){
                            let val = this.Range({r1, c1}).value()[0],
                                r = this.Range({r1, c1: c1, r2, c2});

                            mcLast.cleared = true;
                            this.one('beforeValidate', (evt, ui) => {ui.history = false});
                            r.value([val]);                           
                        }
                    }
                },
16
Hi,

I'm facing a couple of issues with Excel files exported from ParamQuery Grid:

The exported Excel file is downloaded with a .xls extension, which doesn't open properly in Microsoft Office. To work around this, I renamed it to .xlsx, and it opens fine.

However, I'm encountering a problem with merged cells in the exported file. When using the SUM() function on merged cells:

In WPS Office and Microsoft Excel, the sum includes duplicate values from the merged regions (i.e., it adds hidden values under the merged cells).

In LibreOffice, it works correctly and only includes the value from the visible (top-left) cell in the merged range.

This issue appears only in Excel files exported from ParamQuery Grid. If I manually unmerge and remerge the cells in Excel, the problem is resolved — which suggests the initial export includes hidden values in all cells of the merged range.

Is there a way to modify the export logic in ParamQuery so that:

Only the top-left cell of a merged range contains a value,

The other cells in the merged range are left blank (like LibreOffice expects)?

Thanks!
17
Help for ParamQuery Pro / Re: Icon in column header
« Last post by paramvir 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.
18
Help for ParamQuery Pro / Icon in column header
« Last post by queensgambit9 on June 18, 2025, 04:52:42 pm »
Hi

I would like add a icon to column header for a specific column after the title. But not being a part of the title.
What would be the best approach for this?
19
Help for ParamQuery Pro / Re: BootStrap Dropdown not working
« Last post by pbassey on May 29, 2025, 07:55:12 pm »
Perfect!  Thank you...
20
Help for ParamQuery Pro / Re: BootStrap Dropdown not working
« Last post by paramvir 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
Pages: 1 [2] 3 4 ... 10