If you use jEditable in it's pure downloaded form, you cannot implement option grouping within the select.
On the other hand, jEditable isn't such a complicated java file, and you might want to try to add in an option to insert OPTGROUP tags:
maybe something that looks like :
$("#ddlGrouped").editable("url", {
type: 'select',
submit: 'OK',
data: {
'Swedish Cars' : { 'volvo': 'Volvo', 'saab': 'Saab'},
'German Cars' : { 'mercedes': 'Mercedes', 'audi': 'Audi'}
}
})
Here's the part of jEditable that builds the select:
select: {
element: function (settings, original) {
var select = $('<select />');
$(this).append(select);
return (select);
},
content: function (data, settings, original) {
/* If it is string assume it is json. */
if (String == data.constructor) {
eval('var json = ' + data);
} else {
/* Otherwise assume it is a hash already. */
var json = data;
}
for (var key in json) {
if (!json.hasOwnProperty(key)) {
continue;
}
if ('selected' == key) {
continue;
}
var option = $('<option />').val(key).append(json[key]);
$('select', this).append(option);
}
/* Loop option again to set selected. IE needed this... */
$('select', this).children().each(function () {
if ($(this).val() == json['selected'] ||
$(this).text() == $.trim(original.revert)) {
$(this).attr('selected', 'selected');
}
});
}
}
But you'd also have to check how jEditable gets the selected item, and maybe adapt that code too. Sounds like fun to do, but at the moment I don't have the time to try it out and post the working code.
Good luck.