Recent Posts

Pages: [1] 2 3 ... 10
1
Help for ParamQuery Pro / Re: pqSelect, timePicker question
« Last post by Maino on Today at 01:48:00 pm »
Currently, you can click and change one element and change it again. But if you click more than one element, 'pqSelect' doesn't recognize the value properly. Is there any example of applying pqSelect to pqGrid??
2
Help for ParamQuery Pro / Re: pqSelect, timePicker question
« Last post by Maino on Today at 10:23:24 am »
Code: [Select]
        header.cls = 'pq-drop-icon pq-side-icon';
        header.editor.type = 'select';
        header.editor.attr = 'multiple';
        header.editor.mapIndices = {
          [header.editor.labelIndx]: header.editor.labelIndx,
          [header.editor.valueIndx]: header.editor.valueIndx,
        };
        header.editor.init = function (ui) {
          ui.$cell
            .find('select')
            .pqSelect({
              multiplePlaceholder: '선택하세요.',
              checkbox: true, //adds checkbox to options
              maxDisplay: 5,
            })
            .pqSelect('open');
        };
Attachments to previous texts
3
Help for ParamQuery Pro / Re: pqSelect, timePicker question
« Last post by Maino on Today at 10:18:41 am »
If I choose a value like 1.png, it looks like 2.png and the value changes to 3.png.

But if I double click on 2.png and correct it again, the checked value will be released like 4.png and the value will change like 5.png. What is the problem??
4
Dear Paramvir,
Is there any method for  changing the background color and font color of summary (or subtotal) rows in pivot table?
It seems there is no method for changing width of first column of pivot table too.
5
Help for ParamQuery Pro / Re: Spreadsheet column header cells with <select>
« Last post by jplevene on February 23, 2024, 10:23:50 pm »
The above does not work when loading a spreadsheet.  I used:

Code: [Select]
.pqGrid("importWb", { sheet:0, workbook:{sheets:[{}]}, extraRows: 20, extraCols: 10 })
I tried setting:

Code: [Select]
columnTemplate: {
title: function (ui) {
console.log(ui);
return "TEST - " + pq.toLetter(ui.colIndx);
}
},

pqGrid does not call the "title" function if an Excel spreadsheet is loaded for the columns in the spreadsheet, it is only triggers title when new columns are added after the spreadsheet has loaded, but never in the spreadsheet columns.

Also putting a <select> in the title when using "title", clicking it makes the drop down appear then instantly vanish on mouse up.

A "postRenderHead" would be the best option, which can also stop click propagation (what causes the select list to vanish)
6
Help for ParamQuery Pro / Re: Create an empty spreadsheet
« Last post by jplevene on February 23, 2024, 10:11:57 pm »
I did it by:

Code: [Select]
$("#grid").pqGrid("importWb", { sheet:0, workbook:{sheets:[{}]}, extraRows: 10, extraCols: 10 })
7
Help for ParamQuery Pro / Re: Create an empty spreadsheet
« Last post by paramvir on February 23, 2024, 10:10:18 pm »
Empty workbook can be used instead of empty xlsx file and extraRows, extraCols parameters can be used to add empty rows and columns.

Code: [Select]
var wb = {
      sheets: [
        {
          rows: [
          ],         
          columns: [         
          ]
        }
      ]
    }

    //import workbook into the grid.
    grid.importWb({ workbook: wb, extraRows: 20, extraCols: 10 });
8
Help for ParamQuery Pro / Re: Spreadsheet column header cells with <select>
« Last post by paramvir on February 23, 2024, 10:02:14 pm »
column header cells have title callback instead of render callback.

https://paramquery.com/pro/api#option-column-title

Either that can be used or you can use the first row below column header to render select lists in column.render callback.
9
Help for ParamQuery Pro / Create an empty spreadsheet
« Last post by jplevene on February 23, 2024, 08:47:44 pm »
Created a pqGrid and used code below to import a spreadsheet:

        pq.excel.importXl({ url: "https://paramquery.com/pro2/Content/workbook.xlsx" }, function (wb) {
            $("#grid").pqGrid("importWb", { workbook: wb, extraRows: 10, extraCols: 10 });
           $("#grid").pqGrid("hideLoading");
        });

How do I create an empty spreadsheet into my grid without loading an empty xlsx file?  Basically I want to open the grid and it is an empty spreadsheet ready to edit, etc.

SOLVED (See my reply)
10
Help for ParamQuery Pro / Spreadsheet column header cells with <select>
« Last post by jplevene on February 23, 2024, 08:33:12 pm »
I have loaded a spreadsheet using the code below.  Ideally below each column name (being a letter), I want to add a <select> dropdown.  The idea being that the user can select a column field name for each column.

This can either be in the existing header cell or a new one below it.  I can't seem to find a column header render which would work as I could set this in the "columnTemplate"

      var grid = $( "<div>", {
         "id" : (function(){ return "pqgrid"+$(".pq-grid").length; })
      })
      .appendTo( dlg )
      .pqGrid({
         autoAddRow: true,
            autoAddCol: true,
         autoRow: true, // Calc height of every row
         dataModel: {data: []},
         colModel : [],
         numberCell: {width: 40}, // The left number cell index column off
         animModel: {on: true, duration: 190}, // Turn on animation
         stripeRows: false,
         menuIcon: false,
         //scrollModel:{autoFit:true}, // show scroll
         flex: {all:false}, // Width of headers auto fit
         fillHandle: "all", // The small square in bottom right of selection for bulk fill
         width: "100%",
         height: 400,
         // DISPLAY
         skipSSFn : true, // Turn off spread sheet functions (speed increase)
         hoverMode: "cell", // on hover change color effect
         dragColumns: {enabled:false},
            showTitle: false,
            showToolbar: false,
         showTop: false, // Hide top  (including col move icons)
         wrap: false, // Cell content on one line
         hwrap: false, // header content on one line
         collapsible: { on: false },
         sortModel: {on: false},
         sortable: false,
         filterModel: { on: false },
         editor: {
                style: { width: 'auto' },
            select: true
            },
         columnTemplate: {
                filter: {
                    crules: [{ condition: 'range' }]
                },
                title: function (ui) {
                    return pq.toLetter(ui.colIndx);
                }
            },
          editModel: {
                addDisableCls: true,
                //onSave: "downFocus"
            }
      });
Pages: [1] 2 3 ... 10