我得到了dataTable的工作。 唯一的問題是它的標題是正常高度的兩倍。 這似乎是由於非常寬的llist框;數據表中的標題高度表
「顯示[寬列表框中顯示的選項10,25,50,全部] ..line打破.. 項」
其實這應該適合在一個線;但是由於列表框的寬度,它在標題上佔用第二行,使標題太胖。 同樣,頁腳(pager)也有雙倍高度。 我該如何解決這個問題?
謝謝, 維尼特 的代碼是從框架的web2py(基於蟒) 在header--
script tag
$(document).ready(function() {
var oTable = $('#dept_table').dataTable({
"bJQueryUI": true,
"sScrollY": "200px",
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
'sPaginationType': 'full_numbers'
});
});
end script tag
在body--
<h1>Department Master</h1>
<input type='submit' id='addNew' value='Add New Department' /><br /><br />
<table id="dept_table">
<thead>
<tr>
<th>Department ID</th>
<th>Department Name</th>
<th>Link</th>
</tr>
</thead>
<tbody>
{{for department in departments:}}
<tr>
<td>{{=department['deptid']}}</td>
<td>{{=department['deptnm']}}</td>
<td>
{{=A('edit',_href=URL('frmDeptSave',vars={'did':department['deptid'],'dnm':department['deptnm']}),_class='edturl')}}
{{=A('delete',_href=URL('frmDeptDel',vars={'did':department['deptid'],'dnm':department['deptnm']}),_class='delurl')}}
</td>
</tr>
{{pass}}
</tbody>
</table>
PL。告訴我你是否需要任何其他建議解決方案。 ---維尼特
刪除「bJQueryUI」:true不能解決問題。我試過了。我編輯了我的OP來包含代碼。 PL。幫幫我。 – Vineet
有沒有自定義的CSS?因爲你的代碼看起來不錯 –
我已經包含了「jquery-ui-1.8.13.custom」,還有一個用於web2py框架的「base.css」文件。你懷疑base.css文件嗎? PL。告訴我我應該檢查哪些財產。我可以在這裏附上嗎? – Vineet