femprog says:
<script>
$(
function
() {
var
store = $(
'#<%=HiddevActiveTab.ClientID%>'
);
$(
"#TabsId"
).tabs({
active: <%=ActiveTab %>,
activate:
function
(event, ui) {
{store.val(ui.newTab.index());}
var
oTable = $(
'div.dataTables_scrollBody>table:visible'
, ui.panel).dataTable();
if
(oTable.length > 0) {oTable.fnAdjustColumnSizing();}
}
});
var
optDataTables = {
"responsive"
:
true
,
"sPaginationType"
:
"full_numbers"
,
"sScrollY"
:
"450px"
,
"sScrollX"
:
'100%'
,
"bScrollCollapse"
:
true
,
"bPaginate"
:
true
,
"bJQueryUI"
:
true
,
"pageLength"
: 5,
};
$(
'table'
).dataTable(optDataTables);
jQuery.noConflict();
});
</script>
replace above code with below
<script type="text/javascript">
$(function () {
// INIT DATATABLES
// options for datatables
var optDataTables = {
"responsive": true,
"sPaginationType": "full_numbers",
"sScrollY": "450px",
"sScrollX": '100%',
"bScrollCollapse": true,
"bPaginate": true,
"bJQueryUI": true,
"pageLength": 5
};
// initialize data table
$('table').dataTable(optDataTables);
var store = $('#<%=HiddevActiveTab.ClientID%>');
// INIT TABS WITH DATATABLES
$("#TabsId").tabs({
active: '<%=ActiveTab %>',
activate: function (event, ui) {
store.val(ui.newTab.index());
$('table').dataTable(optDataTables);
var oTable = $('div.dataTables_scrollBody>table:visible', ui.panel).dataTable();
if (oTable.length > 0) {
oTable.fnAdjustColumnSizing();
}
}
});
jQuery.noConflict();
});
</script>