Author Topic: Error with dropdown editor  (Read 1314 times)

JoeTexan1962

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 4
    • View Profile
Error with dropdown editor
« on: March 02, 2021, 10:24:46 pm »
I have a grid with a dropdown editor. I copied the Javascript for the grid, including the editor, from the Inline Editing demo.  This is a portion:
            { dataIndx: 'Assignment', hidden: true }, //hidden column to store Assignment Id.
            {
                title: "Assignment", width: 100, dataIndx: "AssignmentText",
                cls: 'pq-dropdown pq-side-icon',
                editor: {
                    type: 'select',
                    init: function (ui) {
                        ui.$cell.find("select").pqSelect();
                        setTimeout(function () {
                            ui.$cell.find("select").pqSelect('open');
                        })
                    },
                    valueIndx: "value",
                    labelIndx: "text",
                    mapIndices: { "text": "AssignmentText", "value": "Assignment" },
                    options: [
                        { "value": "Y", "text": "Yes" },
                        { "value": "N", "text": "No" }
                    ]
                },
                validations: [{ type: 'minLen', value: 1, msg: "Required" }]
            },

 However, I get this error when I click on the cell with the dropdown:


locations.js:787 Uncaught TypeError: ui.$cell.find(...).pqSelect is not a function
    at $.<computed>.<computed>.init (locations.js:787)
    at $.<computed>.<computed>.i.callFn (pqgrid.dev.js:5273)
    at $.<computed>.<computed>.<anonymous> (pqgrid.dev.js:14692)
    at n (pqgrid.dev.js:414)
    at $.<computed>.<computed>.e._trigger (pqgrid.dev.js:436)
    at $.<computed>.<computed>.a._editCell (pqgrid.dev.js:3112)
    at $.<computed>.<computed>.<anonymous> (pqgrid.dev.js:2924)
    at pqgrid.dev.js:2596
    at pq.cRenderBody.scrollXY (pqgrid.dev.js:16085)
    at pq.cRenderBody.scrollCell (pqgrid.dev.js:16074)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Error with dropdown editor
« Reply #1 on: March 03, 2021, 01:05:42 pm »
Please include pqSelect component's css and js file from the SDK in your document.