scrollTo not working on initial load.

scrollTo not working on initial load.

KShepherdKShepherd Posts: 1Questions: 0Answers: 0

I have the following code to initialize the table:

I'm using the Scroller 1.4.0

The on ( 'init.dt' ) event fires correctly, and table.row("#row_" + patientid).select() correctly selects the row, but the scrollTo method does not work.

    table = $('#patients').on( 'init.dt', function () {
                    if (patientid != "") {
                        table.row("#row_" + patientid).select();
                        table.row("#row_" + patientid).scrollTo(false);
                    }
                    
                } ).DataTable( {
            scrollX: true,
            scrollY: 600,
            jQueryUI: true,
            scroller: true,
            pageLength: 50,
            dom: 'Bfrtip',
            ajax: '../php/table.patients.php',
            columns: dataFields,
            select: true,
            lengthChange: false, ///  etc ...

Replies

This discussion has been closed.