Scroller: Select row as selected after scrolling to it

Scroller: Select row as selected after scrolling to it

beginner_beginner_ Posts: 55Questions: 2Answers: 0
edited July 2012 in General
How can i select a row after having scrolled to it with scroller (fnScrollToRow)?

The issue with below code is, that the node has not been created once fnFindCellRowNodes is called and hence null is returned and the row is not selected.

[code]
oSettings.oScroller.fnScrollToRow(rowIndex);
//componentsTable.fnDraw(); //tried this but does not help either
var nodes = componentsTable.fnFindCellRowNodes(noParam, "no");
var node = nodes[0];
$(node).addClass('row_selected');
[/code]

Is there a way to either wait for the nodes to be fully created before fnFindCellRowNodes is called or to programatically create the node for the row we scroll to?

Replies

  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    edited July 2012
    fnCreatedRow is called when a row has been created. You could define a listener to that function, so when fnCreatedRow is fired, the row is selected

    See http://live.datatables.net/odepiv/2/edit for an qnd example of how it could be done
This discussion has been closed.