ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: argo on August 06, 2014, 07:52:51 pm

Title: custom select editor that automatically opens
Post by: argo on August 06, 2014, 07:52:51 pm
Is there any way to have the select box automatically open as soon as the cell goes into edit mode?

Background:
I'm returning a custom <select> using code like the following in the editor function:

var $cell = ui.$cell;
var sel;
// code here to create <select> HTML code in the sel variable
$cell.html(sel);

The custom <select> does properly show up in the cell and is operational, but I need the <select> to be opened automatically as soon as the user enters edit mode. I've tried
$cell.find("select").trigger("click") but nothing happens.
Title: Re: custom select editor that automatically opens
Post by: paramvir on August 06, 2014, 10:27:55 pm
There is not a known consistent way to auto open a select list <select> across all browsers.

There is a related discussion here which might be useful to you.

http://stackoverflow.com/questions/2048213/open-select-using-javascript-jquery
Title: Re: custom select editor that automatically opens
Post by: argo on August 06, 2014, 10:47:16 pm
Thanks. I mistakenly thought it was a pqGrid issue. Sorry about that.