what is wrong with "scrollX": true ?
what is wrong with "scrollX": true ?
ulls
Posts: 1Questions: 1Answers: 0
We need a horizontal scrollbar.
We have a problem with the scrollX:true.
When we resize the browser window the table is not redraw.
e.g. resize from 800px to 1280px
If we do not use scrollX:true the redraw works.
How kann we fixed the error?
Can we redraw the table?
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>table</title>
<link rel="stylesheet" type="text/css" href="/AddOns/DataTables-1.10.5/media/css/jquery.dataTables.css" />
<style type="text/css" class="init">
</style>
<script type="text/javascript" src="/AddOns/DataTables-1.10.5/media/js/jquery.js"></script>
<script type="text/javascript" src="/AddOns/DataTables-1.10.5/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" class="init">
/*
* Example initialisation
*/
$(document).ready(function () {
var table = $('#example').DataTable({
"scrollX": true
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<table id="example" class="display" >
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011/04/25</td>
<td>$320,800</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>63</td>
<td>2011/07/25</td>
<td>$170,750</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
This discussion has been closed.