1

I have a datatable which displays data from an object array. I need to select a row in the table based on some user input on another element on the page.

I have been able to get this to work with the DataTable in non-paged mode with the following function:

function (scrollTo) {
  var container = $('.dataTables_scrollBody');
  container.scrollTop(
    scrollTo.offset().top - container.offset().top + container.scrollTop()
  );
}

Now I need to put the DataTable in paged mode and select a row and the above method does not work. I get the following error: "Unable to get property 'top' of undefined or null reference"

Any pointers will be appreciated.

4

0 回答 0