JQuery Database Tambahkan dropdown di kisi datababe
// static data
var containerTypes = [
"45FR",
"45GPHC",
"45HC",
"45REHC"]
//database columns rendering
{
"data" : null,
"mRender": function (d, t, r) {
var $select = $("<select></select>", {
"id": r[0] + "start",
"value": d
});
$.each(containerTypes, function (k, v) {
var $option = $("<option></option>", {
"text": v,
"value": v
});
if (d === v) {
$option.attr("selected", "selected")
}
$select.append($option);
});
return $select.prop("outerHTML");
}
},
BlackSwan