Individual column filtering (using "input" elements) in multiple tables
Individual column filtering (using "input" elements) in multiple tables
fernandonaim
Posts: 9Questions: 0Answers: 0
Help!
How to put the filter in two different tables on the same page?
Thank you!
How to put the filter in two different tables on the same page?
Thank you!
This discussion has been closed.
Replies
[code]
oTable1 = $('#tabListaProfFaseOrcamentos').dataTable
...
oTable2 = $('#tabListaEquiFaseOrcamentos').dataTable
...
oTable3 = $('#tabListaMatFaseOrcamentos').dataTable
...
[/code]
But only works oTable1;
I think have to change the js below:
[code]
var asInitVals = new Array();
$(document).ready(function() {
$("tfoot input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable1.fnFilter( this.value, $("tfoot input").index(this) );
} );
/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes in
* the footer
*/
$("tfoot input").each( function (i) {
asInitVals[i] = this.value;
} );
$("tfoot input").focus( function () {
if ( this.className == "search_init" )
{ this.className = "";
this.value = "";
this.background = "";
}
} );
$("tfoot input").blur( function (i) {
if ( this.value == "" )
{ this.className = "search_init";
this.value = asInitVals[$("tfoot input").index(this)];
}
} );
} );
[/code]
Do you know how?
(bit quick 'n dirty)
Know how to do research separately?
https://code.google.com/p/jquery-datatables-column-filter/ .
[code]
('#example').dataTable({
// Your params
}).columnFilter({
aoColumns: [ { type: "text"},
{ type: "text"} ] })
[/code]
I am using editable API.How to add multiple input types on same table.
In jquery.jeditable.js library we can only provide one input type.
$.fn.editable.defaults = {
name : 'value',
id : 'id',
type : 'text',
width : 'auto',
height : 'auto',
event : 'click.editable',
onblur : 'submit',
loadtype : 'GET',
loadtext : 'Loading...',
placeholder: 'N/A',
loaddata : {},
submitdata : {},
ajaxoptions: {}
};
In the above type is text only.what to do if i want drop down for a column.
Thanks in Adv.