How to add a individual column filtering?
How to add a individual column filtering?
BernardoLima
Posts: 20Questions: 0Answers: 0
I already have a table and here's the current code:
[code]
var editor; // use a global for the submit and return data rendering in the examples
$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
"ajaxUrl": "php/browsers.php",
"domTable": "#example",
"fields": [
{
"label": "Nome",
"name": "nome",
"type": "text"
},
{
"label": "Email",
"name": "email",
"type": "text"
},
{
"label": "Administrador",
"name": "administrador",
"type": "select",
"ipOpts": [
{
"label": "Sim",
"value": "Sim"
},
{
"label": "N\u00e3o",
"value": "N\u00e3o"
}
]
},
{
"label": "Senha",
"name": "senha",
"type": "password"
}
]
} );
$('#example').dataTable( {
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"sAjaxSource": "php/browsers.php",
"aoColumns": [
{ "mData": "nome" },
{ "mData": "email" },
{ "mData": "administrador" }
],
"oTableTools": {
"sRowSelect": "multi",
"aButtons": [
{ "sExtends": "editor_create", "editor": editor },
{ "sExtends": "editor_edit", "editor": editor },
{ "sExtends": "editor_remove", "editor": editor }
]
}
} );
} );
[/code]
[code]
var editor; // use a global for the submit and return data rendering in the examples
$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
"ajaxUrl": "php/browsers.php",
"domTable": "#example",
"fields": [
{
"label": "Nome",
"name": "nome",
"type": "text"
},
{
"label": "Email",
"name": "email",
"type": "text"
},
{
"label": "Administrador",
"name": "administrador",
"type": "select",
"ipOpts": [
{
"label": "Sim",
"value": "Sim"
},
{
"label": "N\u00e3o",
"value": "N\u00e3o"
}
]
},
{
"label": "Senha",
"name": "senha",
"type": "password"
}
]
} );
$('#example').dataTable( {
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"sAjaxSource": "php/browsers.php",
"aoColumns": [
{ "mData": "nome" },
{ "mData": "email" },
{ "mData": "administrador" }
],
"oTableTools": {
"sRowSelect": "multi",
"aButtons": [
{ "sExtends": "editor_create", "editor": editor },
{ "sExtends": "editor_edit", "editor": editor },
{ "sExtends": "editor_remove", "editor": editor }
]
}
} );
} );
[/code]
This discussion has been closed.
Replies
Allan
I've tried to insert the code from the example and this is what I get:
Before inserting the code:
http://i.imgur.com/kRjJbEM.png
After:
http://i.imgur.com/c2HtqVx.png
PS: I have modified Editor/examples/bootstrap.html to my needs, as you can see if I do not insert any new buttons or customizations (like column filtering,etc), it works properly, but if I try to insert something new it collapses.