Show hide columns dynamically with Multiple tables on tabbed content
Show hide columns dynamically with Multiple tables on tabbed content
Hi i'm using show hide dynamic columns. My page has tabbed content with a table on each tab each with a unique ID. Just above each table I have a drop down button that lists the columns of that specific table. How do I initialize the function so it takes affect on each table, and how would I write the code so that one of my drop down menus won't affect the column vis of another table.
Will I have to create a unique function for each tab?
[code]
function fnShowHide( iCol )
{
/* Get the DataTables object again - this is not a recreation, just a get of the object */
var oTable = $('#keywords').dataTable();
var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
oTable.fnSetColumnVis( iCol, bVis ? false : true );
}
[/code]
Will I have to create a unique function for each tab?
[code]
function fnShowHide( iCol )
{
/* Get the DataTables object again - this is not a recreation, just a get of the object */
var oTable = $('#keywords').dataTable();
var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
oTable.fnSetColumnVis( iCol, bVis ? false : true );
}
[/code]
This discussion has been closed.
Replies