Select first row when first init and after pagination

Select first row when first init and after pagination

iisfaqiisfaq Posts: 9Questions: 2Answers: 0
edited October 2010 in General
I would like to be able to "show" the first row as selected (css style applied) after the DataTables draws for the first time, and also after each pagination.

My jquery is very limited and I am not sure where to add this code.

Any simple help appreciated

Chris

Replies

  • iisfaqiisfaq Posts: 9Questions: 2Answers: 0
    I found a callback would work for this

    "fnRowCallback": function (nRow, aData, iDisplayIndex) {
    /* Append the grade to the default row class name */
    if (iDisplayIndex == 0)
    $(nRow).addClass('row_selected');
    return nRow;
    }

    Chris
This discussion has been closed.