Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

scrollTo not working on initial load.

$
0
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 ...


Viewing all articles
Browse latest Browse all 2364

Trending Articles