Hi, I am using jtable to display data from database, but when i tried to implement paging and any other feature it is showing error.
This is my js code of jtable.
_$MortgageCompaniesTable.jtable({ // title: app.localize('Builders List'), paging: true, sorting: true, multiSorting: true, actions: { listAction: { method: _MortgageCompaniesService.getMortgageCompanies } },
fields: {
id: {
key: true,
list: false
},
actions: {
title: app.localize('Actions'),
width: '15%',
sorting: false,
display: function (data) {
var $span = $('<span></span>');
if (_permissions.edit) {
$('<button class="btn btn-icon btn-xs" title="' + app.localize('Edit') + '"><i class="fa fa-edit"></i></button>')
.appendTo($span)
.click(function () {
// _createOrEditModal.open({ id: data.record.id });
});
}
if (_permissions.delete) {
$('<button class="btn btn-icon btn-xs" title="' + app.localize('Delete') + '"><i class="fa fa-trash-o"></i></button>')
.appendTo($span)
.click(function () {
//deleteRole(data.record);
});
}
return $span;
}
},
mCompanyName: {
title: app.localize('MCompanyName'),
//display: function (data) {
// var $span = $('<span></span>');
// $span.append(data.record.solicitorsName + " ");
// return $span;
//}
},
mCompanyAddress: {
title: app.localize('MCompanyAddress'),
//display: function (data) {
// var $span = $('<span></span>');
// $span.append(data.record.solicitorsAddress + " ");
// return $span;
//}
}
}
});
Result - the result grid is attached with this email. the total count of rows on left bottom corner is showing undefined.
3 Answer(s)
-
0
Hi,
Do you return TotalCount of found records in the output of GetMortgageCompanies method ? You can use PagedResultDto<YourListDto> as the result of GetMortgageCompanies method (use PagedResultOutput if you are using ABP version under 1.0).
-
0
Hi,
Yes its working now. I am using ListresultDto. Now its working after using PagedResultDto.
Thanks
-
0
You are welcome :)