datatables filtering on tab ui panel name
datatables filtering on tab ui panel name
ugo1
Posts: 4Questions: 0Answers: 0
In a recent post I read that is possible filering the table data on tab panel name
http://datatables.net/forums/discussion/7490/use-tabs-for-row-grouping/p1
here the mine [code]
<!DOCTYPE html>
<!-- Html 5 e CSS3 -->
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame Remove this if you use the .htaccess -->
Ugo Internet server - dati in diretta
<!-- Styles -->
<!-- Styles -->
<!-- Jquery javascript -->
<!-- Jquery-ui javascript -->
<!-- Datatables javascript -->
$(document).ready(function () {
$.getJSON('galbiate_tab.html', function(giorni){
$('#tabs ul:first li:eq(0) a').text(giorni[0]);
$('#tabs ul:first li:eq(1) a').text(giorni[1]);
$('#tabs ul:first li:eq(2) a').text(giorni[2]);
$('#tabs ul:first li:eq(3) a').text(giorni[3]);
$('#tabs ul:first li:eq(4) a').text(giorni[4]);
$('#tabs ul:first li:eq(5) a').text(giorni[5]);
$('#tabs ul:first li:eq(6) a').text(giorni[6]);
$('#tabs ul:first li:eq(7) a').text(giorni[7]);
$('#tabs ul:first li:eq(8) a').text(giorni[8]);
});
});
$(document).ready(function() {
$( "#tabs" ).tabs({
select: function(event, ui) {
oTable.fnFilter(ui.tab.innerHTML,0,false); // apply the table filter based on tab name
$('#dataTable').appendTo(ui.panel); // move the table into the selected tab panel
}
});
oTable = $('#dataTable').dataTable({
"fnDrawCallback": function ( oSettings ) {
if ( oSettings.aiDisplay.length == 0 )
{
return;
}
var nTrs = $('#dataTable tbody tr');
var iColspan = nTrs[0].getElementsByTagName('td').length;
var sLastGroup = "";
for ( var i=0 ; i
http://datatables.net/forums/discussion/7490/use-tabs-for-row-grouping/p1
here the mine [code]
<!DOCTYPE html>
<!-- Html 5 e CSS3 -->
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame Remove this if you use the .htaccess -->
Ugo Internet server - dati in diretta
<!-- Styles -->
<!-- Styles -->
<!-- Jquery javascript -->
<!-- Jquery-ui javascript -->
<!-- Datatables javascript -->
$(document).ready(function () {
$.getJSON('galbiate_tab.html', function(giorni){
$('#tabs ul:first li:eq(0) a').text(giorni[0]);
$('#tabs ul:first li:eq(1) a').text(giorni[1]);
$('#tabs ul:first li:eq(2) a').text(giorni[2]);
$('#tabs ul:first li:eq(3) a').text(giorni[3]);
$('#tabs ul:first li:eq(4) a').text(giorni[4]);
$('#tabs ul:first li:eq(5) a').text(giorni[5]);
$('#tabs ul:first li:eq(6) a').text(giorni[6]);
$('#tabs ul:first li:eq(7) a').text(giorni[7]);
$('#tabs ul:first li:eq(8) a').text(giorni[8]);
});
});
$(document).ready(function() {
$( "#tabs" ).tabs({
select: function(event, ui) {
oTable.fnFilter(ui.tab.innerHTML,0,false); // apply the table filter based on tab name
$('#dataTable').appendTo(ui.panel); // move the table into the selected tab panel
}
});
oTable = $('#dataTable').dataTable({
"fnDrawCallback": function ( oSettings ) {
if ( oSettings.aiDisplay.length == 0 )
{
return;
}
var nTrs = $('#dataTable tbody tr');
var iColspan = nTrs[0].getElementsByTagName('td').length;
var sLastGroup = "";
for ( var i=0 ; i
This discussion has been closed.
Replies
updated link http://ugom.comuf.com/meteo/previsioni_sintetiche/galbiate/testuale/galbiate.html
ugo
today I have problems with 20 Gennaio 2013 which it isn't filtered
galbiate_tab can be found here
http://ugom.comuf.com/meteo/previsioni_sintetiche/galbiate/testuale/galbiate_tab.php
galbiate.php can be found here
http://ugom.comuf.com/meteo/previsioni_sintetiche/galbiate/testuale/galbiate.php
Ugo