Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Help for ParamQuery Pro / Customizing Column Menu Items in ParamQuery Grid
« Last post by markn on December 05, 2024, 02:16:29 am »
I am working with ParamQuery Grid and have a heavily customized header using a function, generateColbannerHTML. This function creates a complex HTML structure for the column headers, as shown below:

var colAP = {
    title: generateColbannerHTML(resid, resourceResult),
    //title: resid,
    dataIndx: key,
    valign: "center",
    hidden: false,
    align: 'center',
    datatype: "integer",
    width: 140,
    align: "right"
}


While this works great for the grid's display, I am encountering an issue with the column menu. When a user clicks the menuIcon to filter or choose visible columns, the content displayed in the column menu reflects the raw HTML generated by generateColbannerHTML.


Is there a way to customize or override the items displayed in the column menu so that it shows a clean, user-friendly label instead of the raw HTML from the title property?

Thank you for your assistance!

Best regards
22
Suggest new features / Re: Quick and simple documentation request
« Last post by jplevene on December 03, 2024, 07:54:21 pm »
Please could you do this on the demos page as well (https://paramquery.com/pro/demos) as once I select a demo, the title bar scrolls off here as well.
23
Help for ParamQuery Pro / Re: R2L Support in Edge & Chrome on "Virtual-X: True"
« Last post by irshaid on November 28, 2024, 04:06:10 pm »
Hi


After going through the code, I found that if you change the scale for the screen in Windows from 125% to 100%, the issue appears.

please can you check if you have the same issue after changing the screen scale?
24
Help for ParamQuery Pro / Re: editorKeyPress - get current textfield value
« Last post by paramvir on November 27, 2024, 10:04:10 pm »
if you mean to update options of autocomplete from Manager array.

Code: [Select]
$editor.autocomplete('source', Manager);

Reference: https://api.jqueryui.com/autocomplete/#option-source
25
Help for ParamQuery Pro / Re: editorKeyPress - get current textfield value
« Last post by mikep on November 27, 2024, 03:31:46 am »
thank you.

I saw that example but I need to make an ajax call on every keypress to build the editor array, since the array will change on every keypress.
I'm able to do that, but am not able to rebind the array to the editor.  see my ????? below.



                editorKeyPress: function (evt, ui) {
                    if (ui.dataIndx === 'mgr') {
                        mgrSearch = evt.originalEvent.target.value;
                        charC = (evt.charCode || evt.keyCode),
                        chr = String.fromCharCode(charC);
                        mgrSearch += chr
                        MgrSearch(mgrSearch);
                    }
                }


function MgrSearch(mgrSearch) {

            var data = { 'searchVal': mgrSearch }

            $.ajax({
                type: "POST",
                data: JSON.stringify(data),
                contentType: "application/json; charset=utf-8",
                url: "Services.aspx/SearchManager",
                success: function (data) {
                         Manager = data.d.split(",")

                         //????????????????????????????????????????????????? how can I bind the Manager array at this point?
                         autoCompleteEditor(Manager) //this does not work
          }
}


function autoCompleteEditor(source) {
            return function (ui) {
                ui.$cell.addClass('ui-front');//so that dropdown remains with input.

                //initialize the editor
                ui.$editor.autocomplete({
                    //appendTo: ui.$cell, //for grid in maximized state.
                    source: source,
                    position: {
                        collision: 'flipfit',
                        within: ui.$editor.closest(".pq-grid")
                    },
                    selectItem: { on: true }, //custom option
                    highlightText: { on: true }, //custom option
                    minLength: 0
                }).focus(function () {
                    //open the autocomplete upon focus
                    $(this).autocomplete("search", "");
                });
            }
        }
26
pqgrid is a commonjs module while Vite uses ES modules

so please add 'pqgrid' and 'pqgrid/localize/pq-localize-en.js' in vue.config.js

export default defineConfig({
  plugins: [commonjs(),vue()],
  optimizeDeps: { include: ['pqgrid','pqgrid/localize/pq-localize-en.js']} 
})
27
Help for ParamQuery Pro / Re: editorKeyPress - get current textfield value
« Last post by paramvir on November 26, 2024, 06:25:18 pm »
You can get the editor value in editorKeyUp event.

Code: [Select]
editorKeyUp: function(evt, ui){
  var val = evt.originalEvent.target.value;
}

However you don't need to listen to event to implement autocomplete editor as autocomplete editor takes care of reading editor value and ajax call.

Example: Ship Country column in https://paramquery.com/pro/demos/editing_custom
28
Hello, the following attachment is a reproduction of the problem

node -v   18.16.1

Because the upload limit is 196kb, I cleared the paramquerypro folder in the project. You need to manually put paramquery V10.1.0 in before running the project.

Download dependencies:  npm install
Run the project:  npm run dev
29
v10.1.0 when used locally is working fine with vue3 for me.

This is package.json of my project.

Code: [Select]
{
  "name": "hello-world",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.8.3",
    "vue": "^3.2.13",
    "pqgrid": "file:paramquery-10.1.0",
    "pqselect": "^2.0.1",
    "@types/jquery": ">=2.2.1",
    "@types/jqueryui": ">=1.12.21",
    "jquery": ">=2.2.1",
    "jquery-ui-pack": ">=1.12.3",
    "jszip": "2.5.0"   
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "eslint": "^7.32.0",
    "eslint-plugin-vue": "^8.0.3"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/vue3-essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "@babel/eslint-parser"
    },
    "rules": {
      "no-irregular-whitespace":"off"
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead",
    "not ie 11"
  ]
}

Please share a small project reproducing the error as attachment.
30
vue3+vite5 Importing pqgrid-10.1.0 downloaded locally reports an error

Error content:
main.js:41 TypeError: e is not a function
at pqgrid.min.js:9:7908

Steps:
1. I downloaded the 10.1.0 version of pqgird from the forum and put it in the lib folder under my vite project

2. I manually added "pqgrid": "file:libs/paramquerypro" in package.json-dependencies, and then npm install

3. Use in my vue component
<script setup>
import pq from "pqgrid";
import 'pqgrid/localize/pq-localize-zh.js';

import 'pqgrid/pqgrid.min.css'
import 'pqgrid/pqgrid.ui.min.css'
import 'pqgrid/themes/bootstrap/pqgrid.css'
<script>

The last version of 9 I downloaded using npm worked fine, but after purchasing the pro version, I couldn't use 10.1.0 downloaded from the forum.
Pages: 1 2 [3] 4 5 ... 10