As previously announced via banners and our newsletters, support is no longer available through this platform.
For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.
You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.
Paid customers: Please log in to your store account for support.
Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com
This is not a question but rather a share, in case someone else here faces a similar challenge to me. No answer is expected.
I have an SQL database with 800+ rows that can be filtered using 12 different criteria.
I needed to dynamically assign a row number consistently starting with #1 for any given search result.
Long story short, here is how to do it:
A) First create an empty column number in first position in your database
B) Insert the following JS on the page where you datatable is displayed (I do this using hooks)
<script type="text/javascript">
jQuery(window).on('load',function(){
var drawIndex = false;
wpDataTables.table_1.api().on( 'order.dt search.dt', function ( e, dt, type, indexes ) {
wpDataTables.table_1.api().column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
if (!drawIndex){
if (cell.innerHTML.includes('responsiveExpander')){
console.log(i+1);
cell.innerHTML = cell.innerHTML + (i + 1);
}else if (cell.innerHTML =='') {
cell.innerHTML = i+1;
console.log(i+1);
}
}
cell.innerHTML = i+1;
} );
drawIndex = true;
} ).draw();
});
</script>
Hi Sebastian
Thank you very much for sharing this, I am sure many of our clients will find it useful
Have a wonderful day!