1
Help for ParamQuery Grid (free version) / Re: pqselect in custom editor
« on: July 01, 2016, 01:54:31 am »
I was able to resolve the problem i was having with prepolulating the selected items in multi select with the code below. Basically, when the cell is in focus I read the data from the cell (comma separated string), convert it into an array of selected items, then push that array to the multiselect dropdown. Once that's done, multi select drop down is converted to pgSelect and opened.
Not critical, but I still would like to find out about the questions below.
- Is there a way to align the buttons in the toolbar to the right? I would like to align one of the buttons to the left, but the other to the right in the same toolbar.
- Also, tabbing between cells in edit mode works for all columns, except the pqselect column. Is there a way to fix that?
Code: [Select]
cellEditFocus: function(evt, ui){
if(ui.dataIndx == 'platform'){
if (ui.rowData) {
var rowIndx = ui.rowIndx,
colIndx = ui.colIndx,
dataIndx = ui.dataIndx,
cellData = ui.rowData[dataIndx].replace(/\s/g, '');
}
ui.$cell.find("select").val(cellData.split(","));
ui.$cell.find("select").pqSelect({
multiplePlaceholder: 'Select Platforms',
checkbox: true //adds checkbox to options
}).pqSelect("open");
}
Not critical, but I still would like to find out about the questions below.
- Is there a way to align the buttons in the toolbar to the right? I would like to align one of the buttons to the left, but the other to the right in the same toolbar.
- Also, tabbing between cells in edit mode works for all columns, except the pqselect column. Is there a way to fix that?