Search code examples
jqxgridjqxwidgets

Setting default for empty cell using jqxDropDownList


I'm in the early days of using the jqxGrid. Everything has been going OK but now stuck on using a drop down list to select values for a cell. Here's the relevant code:

createeditor: function (row, column, editor) {
    var list = ['', 'x', '1', '2'];
    editor.jqxDropDownList({ autoDropDownHeight: true, source: list });
}

What I was hoping would happen was that empty cells would be set to '' and then the prompt would never appear and a cell with a value in could be set to '', i.e. deleted. Instead the default prompt appears for an empty cell.

I'd be grateful for any advice on how to get this to work.

Thanks,

Steph


Solution

  • In case anybody stumbles over this the answer was given on the jqxgrid format here: http://www.jqwidgets.com/community/topic/drop-down-list-default-values/