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

Pages: 1 ... 3 4 [5] 6 7 ... 12
61
Help for ParamQuery Pro / Re: Export working, except for .xlsx
« on: February 02, 2022, 01:50:55 am »
That was it. Thank you.

62
Help for ParamQuery Pro / Re: Export working, except for .xlsx
« on: January 27, 2022, 06:35:42 pm »
There's no html in the grid title. Attached is error on load, and the actual .xlsx file. Any other ideas?

63
Help for ParamQuery Pro / Re: Export working, except for .xlsx
« on: January 21, 2022, 07:39:56 pm »
Another question for .xlsx, attached is a screenshot showing csv and xlsx exports for the same grid. The csv is correctly only showing the columns visible in the grid, and .xlsx is showing more columns, the 1st column has no data in it and is on it's own row in excel. Also, I continue to get the attached error before opening the .xlsx file.

64
Help for ParamQuery Pro / Re: Export working, except for .xlsx
« on: January 21, 2022, 05:23:26 pm »
Thanks. I am exporting grid columns that have images, could this be causing the issue?
I have just set the those grid columns with: "exportRender:false", but when I export, these columns are still visible. Do I need to do something else so that the grid columns don't get exported?

65
Help for ParamQuery Pro / Re: Export working, except for .xlsx
« on: January 21, 2022, 02:56:40 am »
Thanks, next issue for .xlsx.

It looks like the .xlsx file is ultimately formatted as html. I debugged the SaveAs method in FileSaver.js and the output appeared identical to my demo page, which successfully exports to .xlsx. I'm attaching the excel and js files for you review. Here's the javascript I'm using that calls the js File.

                var grid = $gridMain.pqGrid('instance');
                var blob = grid.exportData({
                    format: format,
                    render: true
                });

                if (typeof blob === "string") {
                    blob = new Blob([blob]);
                }
                saveAs(blob, "SMART_export." + format);



66
Help for ParamQuery Pro / Re: Export working, except for .xlsx
« on: January 15, 2022, 12:47:48 am »
Including the file worked for .xlsx in my vanilla test page, but I'm getting this error in my app page when calling exportData: "Uncaught invalid color: gray at pqgrid.min.js.17"

Any ideas what to try next?

Here are  my script includes for the page:
    <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
    <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>

    <link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />

    <script src="PQ/pqgrid.min.js"></script>
    <script src="PQ/pq-localize-en.js"></script>
    <script src="PQ/jszip.min.js"></script>
    <script src="PQ/FileSaver.js"></script>

    <link href="PQ/pqgrid.min.css" rel="stylesheet" />
    <link href="PQ/pqgrid.ui.min.css" rel="stylesheet" />

67
Help for ParamQuery Pro / Re: Export working, except for .xlsx
« on: January 14, 2022, 11:49:04 pm »
That's it. Thanks for quick response!!

68
Help for ParamQuery Pro / Export working, except for .xlsx
« on: January 14, 2022, 11:23:06 pm »
I'm getting this error when exporting w/.xlsx. Any ideas? I'm using V.8

pqgrid.min.js:17 Uncaught TypeError: JSZip is not a constructor
    at Object.exportWb (pqgrid.min.js:17:13462)
    at e.cExport.Export (pqgrid.min.js:17:7559)
    at e.<computed>.<computed>.n.exportData (pqgrid.min.js:17:5121)
    at e.<computed>.<computed>.exportData (test.html:53:33)
    at e.<computed>.<computed>.action (test.html:224:48)
    at e.cContext.onclickDoc (pqgrid.min.js:16:314)
    at HTMLBodyElement.dispatch (jquery-2.2.4.min.js:3:7537)
    at HTMLBodyElement.r.handle (jquery-2.2.4.min.js:3:5620)

69
Thank you. I need to change the value of a cell's hovertext on right click. Can you tweak the example below on the 'right click' method to change the cell's hover text, rather than calling 'alert()' ?


https://jsfiddle.net/svkctxhw/

70
Help for ParamQuery Pro / Re: Detect Selected Rows
« on: October 20, 2021, 06:22:04 pm »
Thanks for quick reply. It works great!

I'm updating all my code to account for this.
-what's the best way to get a count of selected rows now? (I'm creating a counter and iterating the foreach, not sure if there's a better way.)
-what the best way to reference the selected row, if the count is 1. (I'm using the foreaach, even though only 1 record, not sure if there's a better way)

--new code
                var selCount = 0;
                grid.Selection().eachRow(function (rowData, rowIndx) {
                    selCount += 1;
                })

--old code
                var grid = $gridMain.pqGrid('instance');
                var selection = grid.SelectRow().getSelection();

                if (selection.length > 1) {
                    showNotify("Only 1 row in the grid can be selected.");
                }
                else if (selection.length == 1) {
                        DoAction(selection[0].rowData)
                }

71
Help for ParamQuery Pro / Re: Detect Selected Rows
« on: October 20, 2021, 04:05:08 pm »
Any idea why I get this error? Code seems identical to this example. https://jsfiddle.net/h02gs4Lk/

72
Help for ParamQuery Pro / Re: Detect Selected Rows
« on: October 19, 2021, 04:00:18 pm »
Changing the selectionModel to { type: 'row' }, doesn't help because I need the cell drag and fill, copy and paste, and delete capability. Can you update the function 'UpdateSelectedRows' in the example below, if the selectionModel is not 'row'?

https://jsfiddle.net/ntkmosa3/

73
Help for ParamQuery Pro / Re: Detect Selected Rows
« on: September 22, 2021, 05:23:50 pm »
Thanks! If I want to iterate all rows and not just the selected rows, how would this line change?

var allRows= grid.SelectRow().getSelection();

74
Help for ParamQuery Pro / Re: Detect Selected Rows
« on: September 22, 2021, 01:11:19 am »
Thanks.  I need to understand how to construct the rowList based on the data index. The updateRow is not updating the correct row for me when when I have the grid grouped, so seeing a working example in the JSFiddle file I sent would help me.

75
Help for ParamQuery Pro / Re: Detect Selected Rows
« on: September 20, 2021, 09:28:56 pm »
Thanks, Are you able to update the example below to show this?

https://jsfiddle.net/yn1km54b/


Pages: 1 ... 3 4 [5] 6 7 ... 12