I've written a custom editor for Slickgrid which shows drop down box with items from sql db. These items are in the formal [id] [text]
I wish to store the [id] into the slickgrid data, but show the [text] to the user. There doesn't appear to be a callback for "display" rather than "store", so not sure how to do this? Hopefully I don't have to write a custom renderer as well?
eg.
this.init = function () {
$select = $("<SELECT tabIndex='0' class='editor-result'><OPTION value='1'>Passed</OPTION><OPTION value='0'>Failed</OPTION></SELECT>");
$select.appendTo(args.container);
$select.focus();
};
this.serializeValue = function () {
return $select.val();
};
this.applyValue = function (item, state) {
item[args.column.field] = state;
};