Help on the implementation of the multi-column search custom button click event

Help on the implementation of the multi-column search custom button click event

v10258v10258 Posts: 8Questions: 0Answers: 0
edited November 2012 in DataTables 1.9
Hello,I am Chinese.My English is very bad, hope to get your understanding
I hope to get your advice.

----------------


......


......


------------------
I want to click on the submit button when multiple parameters need to be filtered is passed to the server.

Submit event is triggered Oh My understanding is that so bad
$(document).ready(function() {
$('#example')
.bind('sort', function () { eventFired( 'Sort' );})
.bind('flter', function () { eventFired( 'Filter' ); })
.bind('page', function () { eventFired( 'Page' ); })
.dataTable();
$("#own").bind('click',function () {
$('#example')
.bind('sort', function () { eventFired( 'Sort' );})
.bind('flter', function () { eventFired( 'Filter' ); })
.bind('page', function () { eventFired( 'Page' ); })
.dataTable();
})
} );

About additional parameters:
"fnServerParams": function ( aoData ) {
//console.log(aoData);
aoData.push( { "name": "more_data", "value": "my_value" } );
//console.log(aoData);
//确保你修改的数据传入数组,因为这是按引用传递的。
}

Replies

  • v10258v10258 Posts: 8Questions: 0Answers: 0
    [code]
    $.fn.dataTableExt.afnFiltering.push(
    function( oSettings, aData, iDataIndex ) {
    var account= document.getElementById('account').value;
    var setdata= document.getElementById('setdata').value ;
    var colunm1= aData[0];
    var colunm2= aData[1];
    if ( account== "" && setdata== "" )
    {
    return true;
    }else if ( colunm1== account && colunm2 == setdata)
    {
    return true;
    }
    else
    return false;
    }
    );
    [/code]

    Seem to find a solution, and very grateful to the authors developed a convenient method
This discussion has been closed.