See the row in datable by display the right pagination page

This plugin jumps to the right page of the DataTable to show the required row

Plug-in code

$.fn.dataTable.Api.register('row().show()', function() {
    var page_info = this.table();
    // Get row index
    var new_row_index = this.index();
    // Row position
    var row_position = this.table()
        .rows({ search: 'applied' })[0]
    // Already on right page ?
    if ((row_position >= page_info.start && row_position < page_info.end) || row_position < 0) {
        // Return row object
        return this;
    // Find page number
    var page_to_display = Math.floor(row_position / this.table().page.len());
    // Go to that page
    // Return row object
    return this;


This plug-in is available on the DataTables CDN:


Note that if you are using multiple plug-ins, it is beneficial in terms of performance to combine the plug-ins into a single file and host it on your own server, rather than making multiple requests to the DataTables CDN.

Version control

If you have any ideas for how this plug-in can be improved, or spot anything that is in error, it is available on GitHub and pull requests are very welcome!


// Add an element to a huge table and go to the right pagination page
  var table = $('#example').DataTable();
  var new_row = {
    DT_RowId: 'row_example',
    name: 'example',
    value: 'an example row'

  table.row.add( new_row ).draw().show().draw(false);