I need to make dropdown as column in DataTable jQuery it is lookinng like as below right now
And I want it like the below image
and the code which I use is
Another way would be to use the render method:
"render": function(d,t,r){
var $select = $("", {
"id": r[0]+"start",
"value": d
});
$.each(times, function(k,v){
var $option = $("", {
"text": v,
"value": v
});
if(d === v){
$option.attr("selected", "selected")
}
$select.append($option);
});
return $select.prop("outerHTML");
}
Working example.