Hi,
My application has left pane and right pane. Right pane has multiple tabs and each tab holds a datatable.
I provide the ability to expand the right pane if the users want to view just the right pane, hence I need to expand my datatables whenever the right pane is expanded.
I am currently using the below code to expand /collapse the datatables but this doesnt seem to work properly. Only one datatable (the current table - viewable table) gets re sized properly, other tables are not getting re sized properly.
Can someone please help me with this issue?
function onCollapse(e) {
var table = $.fn.dataTable.fnTables(true);
if ( table.length > 0 ) {
setTimeout(function () {
for(var i=0;i<table.length;i++){
$(table[i]).dataTable().fnAdjustColumnSizing();
}
}, 200);
}
}
function onExpand(e) {
var table = $.fn.dataTable.fnTables(true);
if ( table.length > 0 ) {
setTimeout(function () {
for(var i=0;i<table.length;i++){
$(table[i]).dataTable().fnAdjustColumnSizing();
}
}, 200);
}
}
Thanks,
Barani
My application has left pane and right pane. Right pane has multiple tabs and each tab holds a datatable.
I provide the ability to expand the right pane if the users want to view just the right pane, hence I need to expand my datatables whenever the right pane is expanded.
I am currently using the below code to expand /collapse the datatables but this doesnt seem to work properly. Only one datatable (the current table - viewable table) gets re sized properly, other tables are not getting re sized properly.
Can someone please help me with this issue?
function onCollapse(e) {
var table = $.fn.dataTable.fnTables(true);
if ( table.length > 0 ) {
setTimeout(function () {
for(var i=0;i<table.length;i++){
$(table[i]).dataTable().fnAdjustColumnSizing();
}
}, 200);
}
}
function onExpand(e) {
var table = $.fn.dataTable.fnTables(true);
if ( table.length > 0 ) {
setTimeout(function () {
for(var i=0;i<table.length;i++){
$(table[i]).dataTable().fnAdjustColumnSizing();
}
}, 200);
}
}
Thanks,
Barani