Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

How to fix paging style for Bootstrap Datatable


I have facing problem to adjust the paging style for bootstrap datatable. Once the datatable loads, the "Previous" button partially hides under Page Number "1".


Your kind support to fix this issue is highly appreciated.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (6)


Hi,

Could you please more details? Which Metronic version, or framework(HTML, React, Angular, ...), demo and build method(gulp or webpack) are you using?

As can be seen, the pagination works well in Metronic v8 demos and Datatables Docs.

Regards.



When I am using the latest version, it fixes the paging issue; since it has arrows rather than word "Previous".
But I face other issues with latest version, one such is the search options get disabled. This option allows the user to filter individually for each column. This "Search Options" feature is not available with latest version. Please advice, if is there any way to get the search option feature in the latest version. I am looking forward to update the current version with the latest available.
Here below is the code that I am currently using for datatable:

var myDtTable = $('[id*=myDtTable]').prepend($("<thead></thead>").append($('[id*=myDtTable]').find("tr:first"))).DataTable({
language: {
searchPanes: {
clearMessage: 'Clear Selections',
collapse: { 0: 'Search Options', _: 'Search Options (%d)' }
}
},
dom: 'Blrtip',
scrollX: true,
stateSave: true,
buttons: [
'searchPanes', 'copy', { extend: 'excel', text: 'Export to Excel', title: 'List' }, 'print'
],
columnDefs: [{
targets: 0,
data: null
}, {
targets: [2, 3, 4, 5],
searchPanes: {
show: true
}
},
{
targets: 4,
render: function (data, type, row) {
var color = 'black';
if (data == 'IsActive') {
color = '#53c653';
}
if (data == 'InActive') {
color = '#ff4d4d';
}
return '<span >' + data + '</span>';
}
}]
});


Thanks for your kind response.
Regards.



Hi,

If you used Metronic v7's Search Options Please note that this feature is not supported in the Metronic's latest v8.1.8 version at the moment.

We added this to our to-do list and we will try to release it as soon as possible. In the meantime, you may try to implement it for Metronic v8.1.8 by referring to the older Metronic v7.x code and the latest Datatables.net API docs.

Regards.



Thanks for your kind reply.

I already tried to implement with latest version of Metronic, but it didn't work and which led me to switch back to the older version.

I appreciate if you could share the release date of new version, so I can make a note and update my application with latest version.

Thanks and regards,
Waseem.



Hi,

Noted. At the moment we can't confirm when the column-based filter feature is added but it's in our todo list and we will do our best to implement it for Metronic v8 as soon as possible.

Regards.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(