ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: Bawzee on January 18, 2017, 03:10:53 am
-
So I have 1 column as shown:
var colM = [
{ title: "Test", width: 130, dataIndx: 0,
filter: { type: 'textbox', condition: 'begin', listeners: ['keyup'] },
editor: {
type: 'select',
options: [,1,2,3,4,5],
},
}
]
When I select the value, it disappears after I tab to a new field. I've looked at all the example and tried different code, but cannot get it to work. I'm sure it's something simple I'm missing and there are 2 or 3 lines of code I can add to the column model above to make the value save after tabbing. Any help is greatly appreciated.
-
Listener property is missing for select editor.
-
Thank you for your reply. It is very much appreciated. I've been stuck on what will likely turn out to be a very simple issue for a couple of days now and I really need to get it figured out. I've tried this:
{ title: "Test", width: 130, dataIndx: 1,
filter: { type: 'textbox', condition: 'begin', listeners: ['keyup'] },
editor: {
type: 'select',
init: function (ui) {
ui.$cell.find("select").pqSelect();
},
options: [,1,2,3,4,5],
},
}
and this:
{ title: "Test", width: 130, dataIndx: 1,
filter: { type: 'textbox', condition: 'begin', listeners: ['keyup'] },
editor: {
type: 'select',
options: [,1,2,3,4,5],
getData: function (ui) {ui.$cell.find("select").pqSelect();}
},
}
but I get the same results, which is the dropdown works and displays ,1,2,3,4,5 and I can select any of the options, but when I tab or click out of the field, the value is blank and the selection does not appear to be retained.
With the exception of this snag, which I understand is likely due something I am doing wrong, I'm loving Paramquery so far and look forward to continuing my evaluation once I figure out how to make the select option work. I really appreciate any assistance you can provide.
-
Apparently your shared piece of code looks fine. Can you please share a small test case / jsfiddle so that I can look into it.
Please try to remove extra commas in your code.
Change options: [,1,2,3,4,5], to options: [1,2,3,4,5]
-
Yeah, I thought my code appeared correct based on the Demo examples, which made it all the more confusing as to why it does not work.
Before I provide a fiddle, I noticed that there is a pqSelect folder in the Paramquery Pro download that contains pqselect js and css files, yet I saw no indication on this page that these were required dependencies for version 3.3. http://paramquery.com/pro/tutorial
Please confirm this is the case.
Thank you.
-
pqSelect is an add on to enhance functionality of select lists; it's not a required dependency.
-
Thank you again for your assistance with this matter. So here is the fiddle: http://jsfiddle.net/Bawzee/4j6ya0L1/2/
So were starting with a blank table and will be adding the first record by clicking the Add Domain button. When I go to edit the row, all fields are editable and retain their data except for the Registrar Select Drop Down. I'm able to select an option, but when I tab out or click another cell in the data I selected disappears from the Select cell.
-
Sorry, I was not clear enough in my previous post.
If pqSelect is being used in the code, then pqSelect js and css files need to be included in the document, otherwise not.
I've commented the pqSelect code from your jsfiddle and it works fine now,
http://jsfiddle.net/4j6ya0L1/3/
BTW it's very useful to look at browser console for any errors if something doesn't work as intended.
-
Thank you, sir. I really appreciate your help with this.