我正在使用datatable插件,我正在对话框中渲染数据表。在firefox中,数据表很好地出现在对话框上。但在IE数据表中根本没有正确显示。在IE滚动条中,对话框不是用于数据表,整个UI看起来很难看,尽管表格宽度超出了对话框的宽度和高度,滚动条根本没有出现。
这是我的代码。
var myplaceholder = $(“#placeholder”);
myplaceholder.setTemplateURL("/Templates/people/makechoice.htm");
myplaceholder.load("/Templates/people/makechoice.htm", function () {
var ot = $("#Datatable").dataTable({
"aoColumnDefs": [
{ "sWidth": "20%", "aTargets": [0] },
{ "sWidth": "20%", "aTargets": [1] },
{ "sWidth": "20%", "aTargets": [2] },
{ "sWidth": "40%", "aTargets": [3]}],
"bJQueryUI": true,
"bFilter": false,
"sScrollY": "600",
"sScrollX": "100%",
"sScrollXInner": "400%",
"bScrollCollapse": true,
"bPaginate": false,
"bProcessing": false,
"sAjaxSource": "/People/Makechoice",
"fnServerParams": function (aoData) {
aoData.push({ "name": "Searchfilter", "value": searchString });
},
"bLengthChange": false,
"oTableTools": {
"sRowSelect": "multi",
"aButtons": []
},
"bDestroy": true,
"sDom": 'T<"clear">frtp',
"fnInitComplete": function (oSettings, json) {
}
});
});
这是我的Aspx div,我正在渲染数据表
<div id="placeholder" style="width:320px">
</div>
答案 0 :(得分:0)
这是兼容性问题,请参阅更多信息http://blogs.msdn.com/b/askie/archive/2009/03/23/understanding-compatibility-modes-in-internet-explorer-8.aspx
刚刚在site.master中添加了<meta http-equiv="X-UA-Compatible" content="IE=7; IE=8" />
,它有效