Unable to install fnGetHiddenNodes API plugin

Unable to install fnGetHiddenNodes API plugin

PaoloValladolidPaoloValladolid Posts: 35Questions: 0Answers: 0
edited September 2010 in General
I added this line to my JSPX file, as instructed here: http://datatables.net/plug-ins/api#fnGetHiddenNodes



I got an "Object doesn't support this property or method" error message upon load of the page.

Is fnGetHiddenNodes provided in another .js file? I searched jquery.dataTables.js and was unable to find fnGetHiddenNodes there

Replies

  • PaoloValladolidPaoloValladolid Posts: 35Questions: 0Answers: 0
    Bump - still very much need this information. The instructions do not work for me, as previously stated.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi PaoloValladolid,

    Did you save the fnGetHiddenNodes plug-in into the file you are including? The easiest way is like this example: http://datatables.net/examples/plug-ins/plugin_api.html

    Allan
  • PaoloValladolidPaoloValladolid Posts: 35Questions: 0Answers: 0
    Hi Allan,

    So the solution would be to copy the following function into my copy of jquery.dataTables.js?

    $.fn.dataTableExt.oApi.fnGetHiddenTrNodes = function ( oSettings )
    {
    /* Note the use of a DataTables 'private' function thought the 'oApi' object */
    var anNodes = this.oApi._fnGetTrNodes( oSettings );
    var anDisplay = $('tbody tr', oSettings.nTable);

    /* Remove nodes which are being displayed */
    for ( var i=0 ; i
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    The easiest is like in the demo example linked above:

    [code]


    /*
    * Function: fnGetHiddenTrNodes
    * Purpose: Get all of the hidden TR nodes (i.e. the ones which aren't on display)
    * Returns: array:
    * Inputs: object:oSettings - DataTables settings object
    */
    $.fn.dataTableExt.oApi.fnGetHiddenTrNodes = function ( oSettings )
    {
    /* Note the use of a DataTables 'private' function thought the 'oApi' object */
    var anNodes = this.oApi._fnGetTrNodes( oSettings );
    var anDisplay = $('tbody tr', oSettings.nTable);

    /* Remove nodes which are being displayed */
    for ( var i=0 ; i
This discussion has been closed.