Author Topic: custom select editor that automatically opens  (Read 2908 times)

argo

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 33
    • View Profile
custom select editor that automatically opens
« 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.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: custom select editor that automatically opens
« Reply #1 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
« Last Edit: August 06, 2014, 10:30:18 pm by paramquery »

argo

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: custom select editor that automatically opens
« Reply #2 on: August 06, 2014, 10:47:16 pm »
Thanks. I mistakenly thought it was a pqGrid issue. Sorry about that.