Datatable Select Tag
Datatable Select Tag
I have created one select type column for each row in datatable. Here userTypeList is an array in which I added some datas. When the datatable is loaded the value is not populated in select type datas.
vm.dataTableInstance = $('.datatable-basic').DataTable({
data : userList,
columns : [
{ data: 'fname', title : 'First name', width: '10%' },
{ data: 'lname', title : 'Last Name', width: '5%' },
{ data: null, title : 'User Type', width: '5%',render:function(data,type,row){
return '<select data-placeholder="Select a type" id="userTypeSelect" class="select" ><option>'+userTypeList+'</option></select>';
}}
],
order: [0, "asc"],
bPaginate : false,
rowReorder: {
selector: 'td:nth-child(2)'
},
});