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

Pages: [1] 2 3 4
1
I have verified that the code you provided is working correctly. Thank you.

2
Yes, this issue is occurring on a live production site, so a quick fix is required.
I will continue monitoring this thread.

Please share the updated code once the fix is completed.
Thank you.

3
If the issue has been resolved, could you share the updated source code?

4
Help for ParamQuery Pro / pqGrid Excel Export – replace parameter
« on: April 20, 2026, 12:55:50 pm »
I have an additional question regarding the exportData function in pqGrid.

The `replace` option does not seem to work as expected. I’m not sure if I am using the syntax incorrectly or if there is another issue.

Here is a sample of my code:

Code: [Select]
var blob = await grid.exportData({
    // url: "exportData.do",
    format: format,
    nopqdata: true, // applicable for JSON export
    render: false,
    sheetName: "Example",
    replace: [/<br\/>/g, '\r\n']
});

if (typeof blob === "string") {
    blob = new Blob([blob]);
}

saveAs(blob, excelNm + "." + format);

The goal is to replace <br/> tags with line breaks (\r\n) in the exported file, but it does not seem to be applied.

Could you please confirm whether:
1. The `replace` option syntax is correct?
2. There are any limitations or conditions where `replace` does not work?
3. There is an alternative way to handle line breaks during export?

Any help would be appreciated.

5
Hello,

I would like to report an issue observed in pqGrid v11 regarding editor behavior.

When the focus is initially on a cell with editable: false, and then moved (via keyboard navigation) to another cell that is editable but has a null value, the editor becomes active but does not allow text input immediately. The user must click the cell again with the mouse before text input works properly.

This behavior causes inconvenience, especially when navigating cells using the keyboard and attempting to enter text by pressing Enter.

You can reproduce this issue using the demo page below:
https://paramquery.com/pro/demos/edit_multiline

After navigating to the page, apply the following modifications:

Code: [Select]
var colM = [{
        title: "Auto size editor (Enter for new lines)",
        width: 200,
        dataIndx: "ShipAddress1",
        editable: false,
        editModel: {
            saveKey: ''
        }
    },
    {
        title: "Auto size editor (Alt-Enter for new lines)",
        width: 200,
        dataIndx: "ShipAddress2"
    },
    {
        title: "Manually resizable editor",
        width: 200,
        dataIndx: "ShipAddress3",
        editor: {
            type: "textarea",
            attr: "rows=8 cols=58",
            style: "resize:both;",
            appendTo: 'grid'
        },
        editModel: {
            saveKey: ''
        }
    }
];

var dataModel = {
    location: "remote",
    dataType: "JSON",
    method: "GET",
    url: "/content/invoice.json",
    getData: function(response) {
        response.data.forEach(function(rd) {
            rd.ShipAddress1 = rd.ShipAddress2 = rd.ShipAddress3 =
                rd.ShipAddress + "\n" +
                rd.ShipCity + "\n" +
                (rd.ShipRegion || "") + "\n" +
                rd.ShipPostalCode;
        });
        return response;
    }
};

$("div#grid_custom_editing").pqGrid({
    title: "Shipping Orders",
    dataModel: dataModel,
    colModel: colM,
    autoRow: true,
    scrollModel: {
        autoFit: true
    },
    columnTemplate: {
        valign: 'center'
    },
    create: function(evt, ui) {
        this.widget().pqTooltip();
    },
    editModel: {
        clicksToEdit: 1,
        keyUpDown: false
    },
    numberCell: {
        show: false
    },
    resizable: true
});

Please refer to the attached screenshots for the test scenario and behavior.

Thank you for your support.

6
Hello,

I have a question regarding exporting pqGrid data to an Excel file.

When exporting, I would like to customize:

   - Borders for both header cells and data cells
   - Row height for headers and data

However, I’m finding it difficult to implement this using only the API documentation. It would be very helpful if you could provide a sample example demonstrating how to apply these styles during export.

Additionally, in my current implementation, I’ve noticed that when a grid cell value is null, the border is not applied in the exported Excel file. I would appreciate it if you could confirm whether this is expected behavior or if there is a way to handle it properly.

Thank you in advance for your help.

7
Thank you for your answer. Have a nice day.

8
 The code you provided works correctly.
However, I encountered the following error: Uncaught ReferenceError: gExcel is not defined

So I added a declaration for gExcel like below.
Could you please confirm if this is the correct approach?

Code: [Select]
!function(e){var gExcel = null;e(document).off(".pqExcel").on("keydown.pqExcel",function(c){var t,n,i=e(document.activeElement),l=i.parent(),o=l.is(".pq-focus-mgr:not(.pq-editor-outer)"),r=o,p=c.key,E=c.keyCode,u=e.ui.keyCode,g=e=>{t=i.closest(".pq-grid"),n=t.pqGrid("instance")};if(!o||E!=u.UP&&E!=u.DOWN||c.preventDefault(),o&&E==u.DELETE&&(g(),n?.clear()),pq.isCtrl(c)&&r&&(g(),gExcel||i.length&&n)){if(!gExcel)try{if(n.options.selectionModel.native)return!0;gExcel=new cExcel(n)}catch(e){return!0}i=gExcel.initClip(i,l),"f"!=p&&"F"!=p||e(document).trigger("keyup.pqExcel")}}).on("keyup.pqExcel",function(e){if(!pq.isCtrl(e)&&gExcel){gExcel=null}}).on("click.pqExcel keydown.pqExcel",function(c){"click"!=c.type&&e.ui.keyCode.ENTER!=c.keyCode||e(c.target).trigger("pq:clickE")})}(jQuery);

9
Help for ParamQuery Pro / Issue with Copy Functionality Inside Grid
« on: April 14, 2026, 07:27:51 am »
In pqGrid version 11, copying cell content via Ctrl + C seems to rely on the navigator.clipboard API, which requires a secure (HTTPS) context.

Our system runs on an internal network over HTTP, so this functionality is not available.

As this issue impacts a production environment, we would appreciate any possible workaround or alternative approach.

Thank you in advance.

10
I have an additional question regarding another issue.

In my environment, I am using the treeModel. When the summaryInTitleRow option is enabled, pressing the Delete key while the editor is active causes the editor to close immediately.

Due to this, combined with the previously mentioned issue, the original cell data is already removed, and the validation logic is triggered twice, resulting in behavior that differs from pqGrid version 9.

As a result, the existing data in the cell is completely cleared, and the editor is closed, leading to total data loss.

I am not sure if the issue with the editor closing on the Delete key should be considered in the same context, but since it is affecting our production system, a quick resolution is required.

If there is a solution, I would greatly appreciate it if you could share it along with example source code.

Thank you.

11
Hello,

I noticed a difference in behavior between pqGrid v9 and v11.

1. In pqGrid v9:
When a cell is in editor mode, if I press the Delete key to clear the content and then press ESC, the original value is restored.

2. In pqGrid v11:
After pressing the Delete key, the cell value is already removed, and pressing ESC does not restore the original value.

Could you please confirm if this is an intended change or a bug?

This behavior can also be reproduced on the demo site.

pqGrid9 (https://paramquery.com/pro/demos91/editing_instant)

pqGrid11 (https://paramquery.com/pro/demos/editing_instant)

Thank you.

12
I've applied the code you provided, and I can confirm that both issues are now resolved. Thank you

13
"Please see the example below regarding question number 2."


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

15

In version 8.x, it was used as follows:

Code: [Select]
-- Initial settings
dataModel: {data: []}

-- When clicking the search button
$("#btnSearch").click(function() {
var postData = $(form + " :input").serializeObject();
var dataModel = {
location: "remote",
dataType: "JSON",
method: "POST",
url: $(form).attr("action"),
postData: postData
};

$("#gridDiv").pqGrid("option", "dataModel", dataModel);
$("#gridDiv").pqGrid("refreshDataAndView");
});

However, in version 9.x an error occurs.

pqgrid.min.js:9  Uncaught TypeError: Cannot read properties of undefined (reading 'bind')
    at A.callXHR (pqgrid.min.js:9:62732)
    at A.remoteRequest (pqgrid.min.js:9:63058)
    at A.refreshDataAndView (pqgrid.min.js:9:66110)
    at HTMLDivElement.<anonymous> (jquery-ui.min.js:6:8934)
    at Function.each (jquery-2.2.4.min.js:2:2861)
    at a.fn.init.each (jquery-2.2.4.min.js:2:845)
    at e.fn.<computed> [as pqGrid] (jquery-ui.min.js:6:8817)
    at HTMLDivElement.<anonymous> (uprt.common.js?ver=2022052101:43:17)
    at HTMLDivElement.dispatch (jquery-2.2.4.min.js:3:7537)
    at r.handle (jquery-2.2.4.min.js:3:5620)



In version 9.x, how do the grid display data only when the search button is clicked without searching the data when entering the page?

Pages: [1] 2 3 4