Drop down plugin not working

Drop down plugin not working

illectronicillectronic Posts: 20Questions: 0Answers: 0
edited October 2013 in Plug-ins
I am trying to use this code and the dropdowns do not appear: http://datatables.net/release-datatables/examples/api/multi_filter_select.html

Where should I be putting this? How can I make the dropdown appear on top instead? I am using datatables 1.10

Thanks

Replies

  • illectronicillectronic Posts: 20Questions: 0Answers: 0
    Specifically it says cannot reinistialise datatable
  • illectronicillectronic Posts: 20Questions: 0Answers: 0
    edited October 2013
    Here is the complete jquery code. I think it's because I am trying to initialise the table twice but I can't figure out how to get fixedheaders and this drop down plugin to play nice together.

    [code]
    $(document).ready(function() {
    var Table = $("#top-table").dataTable({
    "bProcessing": true,
    "bServerSide": true,
    "sScrollX": "100%",
    "sScrollY": 250,
    "aaSorting": [[ 0, "desc" ]],
    "sAjaxSource": "ssi/server_side.php",
    "fnRowCallback": function( nRow, aData, iDisplayIndex ) {
    /* Append the grade to the default row class name */
    if ( aData[1] == "Imported" | aData[1] == "Complete")
    {
    $('td:eq(1)', nRow).addClass('greenbg');
    }
    else if ( aData[1] == "HoldNotUsed" | aData[1] == "Downloaded" )
    {
    $('td:eq(1)', nRow).addClass('bluebg');
    }
    else if ( aData[1] == "Decrypted" | aData[1] == "LoadReady" | aData[1] == "Processing" | aData[1] == "Received" )
    {
    $('td:eq(1)', nRow).addClass('yellowbg');
    }
    else if ( aData[1] == "DecryptErr" | aData[1] == "DownloadErr" | aData[1] == "FtpError" | aData[1] == "LoadErr" | aData[1] == "Misplaced" | aData[1] == "multiLoadFail" )
    {
    $('td:eq(1)', nRow).addClass('redbg');
    }
    },
    "fnCreatedRow": function( nRow, aData, iDataIndex ) {
    // Bold the grade for all 'A' grade browsers
    $('td:eq(0)', nRow).html( ''+aData[0]+'' )
    $('td:eq(1)', nRow).html( ''+aData[1]+'' )
    }



    });
    });



    (function($) {
    /*
    * Function: fnGetColumnData
    * Purpose: Return an array of table values from a particular column.
    * Returns: array string: 1d data array
    * Inputs: object:oSettings - dataTable settings object. This is always the last argument past to the function
    * int:iColumn - the id of the column to extract the data from
    * bool:bUnique - optional - if set to false duplicated values are not filtered out
    * bool:bFiltered - optional - if set to false all the table data is used (not only the filtered)
    * bool:bIgnoreEmpty - optional - if set to false empty values are not filtered from the result array
    * Author: Benedikt Forchhammer
    */
    $.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) {
    // check that we have a column id
    if ( typeof iColumn == "undefined" ) return new Array();

    // by default we only want unique data
    if ( typeof bUnique == "undefined" ) bUnique = true;

    // by default we do want to only look at filtered data
    if ( typeof bFiltered == "undefined" ) bFiltered = true;

    // by default we do not want to include empty values
    if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true;

    // list of rows which we're going to loop through
    var aiRows;

    // use only filtered rows
    if (bFiltered == true) aiRows = oSettings.aiDisplay;
    // use all rows
    else aiRows = oSettings.aiDisplayMaster; // all row numbers

    // set up data array
    var asResultData = new Array();

    for (var i=0,c=aiRows.length; i -1) continue;

    // else push the value onto the result data array
    else asResultData.push(sValue);
    }

    return asResultData;
    }}(jQuery));


    function fnCreateSelect( aData )
    {
    var r='', i, iLen=aData.length;
    for ( i=0 ; i
  • illectronicillectronic Posts: 20Questions: 0Answers: 0
    Final bump
This discussion has been closed.