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

Pages: [1]
1
Help for ParamQuery Pro / excel export error
« on: April 18, 2019, 02:31:39 pm »

The csv, html, and json context menus work fine, but the xlsx and xlsxMethod2 context menus fail.


Here is my exception message:
Quote

pqgrid.min.js:17 Uncaught TypeError: Cannot read property 'getFnW' of undefined
    at e.(anonymous function).(anonymous function)._pq.pqGrid.getFormula (http://127.0.0.1:5500/library/paramquery/pqgrid.min.js:17:12223)
    at e.cExport.getXlsBody (pqgrid.min.js:17)
    at e.cExport.getWorkbook (pqgrid.min.js:17)
    at e.cExport.Export (pqgrid.min.js:16)
    at e.(anonymous function).(anonymous function).n.exportData (http://127.0.0.1:5500/library/paramquery/pqgrid.min.js:16:26761)
    at e.(anonymous function).(anonymous function).exportFile (http://127.0.0.1:5500/public/paramquery_wrapper.js:332:25)
    at e.(anonymous function).(anonymous function).action (http://127.0.0.1:5500/public/paramquery_module.js:40:75)
    at e.cContext.onclickDoc (pqgrid.min.js:15)
    at HTMLBodyElement.dispatch (jquery.min.js:3)
    at HTMLBodyElement.v.handle (jquery.min.js:3)
_pq.pqGrid.getFormula @ pqgrid.min.js:17
getXlsBody @ pqgrid.min.js:17
getWorkbook @ pqgrid.min.js:17
Export @ pqgrid.min.js:16
n.exportData @ pqgrid.min.js:16
exportFile @ paramquery_wrapper.js:332
action @ paramquery_module.js:40
onclickDoc @ pqgrid.min.js:15
dispatch @ jquery.min.js:3
v.handle @ jquery.min.js:3


pqgrid.min.js:17 Uncaught TypeError: Cannot read property 'getFnW' of undefined
    at e.(anonymous function).(anonymous function)._pq.pqGrid.getFormula (http://127.0.0.1:5500/library/paramquery/pqgrid.min.js:17:12223)
    at e.cExport.getXlsBody (pqgrid.min.js:17)
    at e.cExport.getWorkbook (pqgrid.min.js:17)
    at e.cExport.Export (pqgrid.min.js:16)
    at e.(anonymous function).(anonymous function).n.exportData (http://127.0.0.1:5500/library/paramquery/pqgrid.min.js:16:26761)
    at e.(anonymous function).(anonymous function).action (http://127.0.0.1:5500/public/paramquery_module.js:45:49)
    at e.cContext.onclickDoc (pqgrid.min.js:15)
    at HTMLBodyElement.dispatch (jquery.min.js:3)
    at HTMLBodyElement.v.handle (jquery.min.js:3)
_pq.pqGrid.getFormula @ pqgrid.min.js:17
getXlsBody @ pqgrid.min.js:17
getWorkbook @ pqgrid.min.js:17
Export @ pqgrid.min.js:16
n.exportData @ pqgrid.min.js:16
action @ paramquery_module.js:45
onclickDoc @ pqgrid.min.js:15
dispatch @ jquery.min.js:3
v.handle @ jquery.min.js:3



Here is my code:

Code: [Select]

export class ParamQuery {

    exportFile(format) {

        let blob = this.exportData({ format: format });
        if (typeof blob === "string") {
            blob = new Blob([blob]);
        }
        saveAs(blob, "pqGrid." + format);
    }

}


export class PQContextMenu extends HelperBase {
    constructor(instance) {
        super(instance);
        this.on = true;
        this.head = true;
        this.items = this.getItems;
    }
    getItems(evt, ui) {
        return (ui.$th)
            ? []
            : [
                {
                    name: 'Export',
                    subItems: [
                        {
                            name: 'csv',
                            action: function () { this.wrapper.exportFile.call(this, "csv"); }
                        },
                        {
                            name: 'html',
                            action: function () { this.wrapper.exportFile.call(this, "html"); }
                        },
                        {
                            name: 'json',
                            action: function () { this.wrapper.exportFile.call(this, "json"); }
                        },
                        {
                            name: 'xlsx',
                            action: function () { this.wrapper.exportFile.call(this, "xlsx"); }
                        },
                        {
                            name: 'xlsxMethod2',
                            action: function () {
                                let blob = this.exportData({
                                    //url: "/pro/demos/exportData",
                                    format: "xlsx",
                                    nopqdata: false,
                                    render: true
                                });
                                if (typeof blob === "string") {
                                    blob = new Blob([blob]);
                                }
                                saveAs(blob, "pqGrid." + "xlsx");
                            }
                        }
                    ]
                },
                'separator',
                {
                    name: "Copy",
                    icon: 'ui-icon ui-icon-copy',
                    shortcut: 'Ctrl - C',
                    //tooltip: "Works only for copy / paste within the same grid",
                    action: function () {
                        this.copy();
                    }
                },
                {
                    name: "Paste",
                    icon: 'ui-icon ui-icon-clipboard',
                    shortcut: 'Ctrl - V',
                    //disabled: !this.canPaste(),
                    action: function () {
                        this.paste();
                        //this.clearPaste();
                    }
                },
            ];
    }
}

reference link = > https://paramquery.com/pro/demos/context_menu

2
News / Re: Upgrade to Pro Version 6.0.0
« on: April 16, 2019, 12:11:31 pm »
Hi,

where can I find UPGRADE GUIDE that you mentioned above?

Thanks in advance.

3
Help for ParamQuery Pro / Re: what is difference of initialize?
« on: March 27, 2019, 05:55:43 am »
thanks.  :)

4
Help for ParamQuery Pro / what is difference of initialize?
« on: March 26, 2019, 12:02:42 pm »
grid appear gray mask about 6 by 4 rectangle when i click cell.
i lost too many my time. To figure out what the problem is.

you cast test array.htm in zip file.

good working case
Code: [Select]
$(function () {

      $("#grid_array").pqGrid( obj );
});

bad working case
Code: [Select]
      $("#grid_array").pqGrid( obj );


5
The problem is that paramquery is not drawn normally if the parent div is invisible.
How can I fix it?

ps:
I have a pro license, but I am working on a free version.

Pages: [1]