We are trying to create our own entity list in the product, using the JS approach that you use, but are having issues.
We have a table that is defined as this:
<div class="row align-items-center">
<table id="WalletsTable" class="display table table-striped table-bordered table-hover dt-responsive nowrap">
<thead>
<tr>
<th>Actions</th>
<th>Coin</th>
<th>Balance</th>
<th>Value</th>
</tr>
</thead>
</table>
</div>
We then have this code to populate it:
var dataTable = _$walletsTable.DataTable({
paging: true,
serverSide: true,
processing: true,
listAction: {
ajaxFunction: _clientWalletsService.getWallets
},
columnDefs: [
{
targets: 0,
data: null,
orderable: false,
autoWidth: false,
defaultContent: 'rgdf',
rowAction: {
cssClass: 'btn btn-brand dropdown-toggle',
text: '<i class="fa fa-cog"></i> ' + app.localize('Actions') + ' <span class="caret"></span>',
items: [{
text: app.localize('LoginAsThisUser'),
visible: true,
action: function (data) {
abp.ajax({
url: 'Account/Impersonate',
data: ''
});
}
}],
},
},
{
targets: 1,
data: "currency"
},
{
targets: 2,
data: "balance"
},
{
targets: 3,
data: "value"
}
]
});
The problem we have is, that when the page initially loads, the Actions column shows, but then once the Ajax call has completed, it disappears and we are left with 3 columns.
Any ideas?
2 Answer(s)
-
0
Hi,
Your definition seems fine actually. Please try to use a different value for the cssClas like the below one;
cssClass: 'btn btn-xs btn-primary blue'
If it doesn't work for you either, could you share your project via email so we can check it.
-
0
Hi @[email protected], did you solve this issue?
Could you check generated code at browser side and share this? Any browser console error are you getting?