How use datatables with multiple data source
How use datatables with multiple data source
zoners
Posts: 2Questions: 2Answers: 0
Hello,
I have a datatables and I use ajax request to get the data from the serverSide. But I have an other datasource for one cell ("List Role") which use another ajax source.
How to use this sources for the cell("List Role") and how display a "<selec...><option..>" for the cell which is "ListRole"?
My code example:
<table id="gridrole" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Nom</th>
<th>Login</th>
<th>Email</th>
<th>Role Actuelle</th>
<th>List Role</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Nom</th>
<th>Login</th>
<th>Email</th>
<th>Role Actuelle</th>
<th>List Role</th>
</tr>
</tfoot>
</table>
$('#gridrole').dataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": "/Role/ReadRole/",
"dataType": "json"
},
columns: [
{ "data": "UserName" },
{ "data": "Login" },
{ "data": "Email" },
{ "data": "RoleName" },
{
"data": "ListRole"
}
],
});
Thanks for your help.
This discussion has been closed.