how to filter textbox value of a row after bStateSave is true?

how to filter textbox value of a row after bStateSave is true?

rashrash Posts: 2Questions: 0Answers: 0
edited March 2014 in General
search works fine but when i edit any row that load page and that's change label/string value to textbox in a row and using bstate to get back previous state of search value then problem i am getting is that value that textbox value not getting search by fnfilter, its searching other value but not that for textbox.

Replies

  • rashrash Posts: 2Questions: 0Answers: 0
    edited March 2014
    here is my code that i am using.
    [code]
    \$(document).ready(function()
    {
    var oTable = \$('#chart').DataTable(
    {
    "aoColumnDefs": [
    { "sType": "string", "aTargets": [ 10 ] }
    ],
    "bSort": false,
    "bJQueryUI": true,
    "sPaginationType": "full_numbers",
    "oLanguage": {
    "sSearch": "Search all columns:"
    },
    "bStateSave": true,
    "fnInitComplete": function() {
    var oSettings = \$('#chart').dataTable().fnSettings();
    for ( var i=0 ; i0){
    \$("thead input")[i].value = oSettings.aoPreSearchCols[i].sSearch;
    \$("thead input")[i].className = "";
    }
    }
    }
    } );

    \$("thead input").keyup( function () {
    /* Filter on the column (the index) of this element */
    oTable.fnFilter( this.value, \$("thead input").index(this) );
    } );

    [/code]
  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67
    edited March 2014
    You can take a look at my yadcf plugin, it support the bStateSave and it has a simple text filter type too
    http://yadcf-showcase.appspot.com/ajax_mData_source.html
This discussion has been closed.