0

也许有人以前遇到过这个数据表问题?

我有一个在 Firefox 和 Chrome 中运行良好的 jquery 数据表。当在 IE7 和 IE8 中显示完全相同的表格时,它无法正确显示。Firefox 和 Chrome 是最新的版本。

问题表现如下: - 表的初始呈现在所有 3 个浏览器中都很好。- 但是在 IE7 和 IE8 中,当用户选择一列并尝试将其移动时,从该列向前移动的整个表格以及屏幕的其余部分都以蓝色突出显示。

这是我的表定义:

oTable = 
$('#datalog').dataTable( {
    "sDom": 'RC<"clear">lfrtip',                        // Specify exactly where in the DOM you want DataTables to inject the various controls: http://datatables.net/usage/options#sDom
    "oColReorder": {
        "aiOrder": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],    // Defaults for setting the Columns. See "aoColumns" entries.
        "iFixedColumns": 2                              // Prevent first 2 columns in "aoColumns" entries from being moved.
    },
    "oColVis": {
        "aiExclude": [ 0, 1 ],                          // Prevent the columns in "aoColumns" from being enabled/disabled.
        "buttonText": $("#ressShowHideColumns").text()  // Localise Column Show/Hide button.
    },
    "bFilter": false,                       // Disable the Search Text box i.e. disable filtering
    "bSort": false,                         // Disable sorting of Columns
    "bDeferRender": true,
    "bStateSave": true,                     // Save State e.g. Column order, which columns are hidden, pagination.
    "sScrollY": "365px",                    // Allow a vertical scroll bar. Make the table xxxpx high
    "bPaginate": true,                      // Enable Pagination.
    "sPaginationType": "full_numbers",      // Use full set of Pagination Navigation buttons. Default is two (Previous & Next).
    "bInfo": true,                          // Enable display table info: "Showing X to XXX of XXX entries" 
    "bAutoWidth": true,                     // Auto width for display of Columns
    "bProcessing": true,                    // Display "Processing" when page is busy
    "bServerSide": true,                    // Get the data from the Server
    "sAjaxSource": ajaxURL,     // URL used to update Table via Ajax calls.
    "bJQueryUI": true,                      // Use JQuery UI Theme instead of the default Datatables theme
    "aoColumns": [
        { "mDataProp": "col0" },            // 0 - Column Array Index Position
        { "mDataProp": "col1" },        // 1
        { "mDataProp": "col2" },    // 2
        { "mDataProp": "col3" },    // 3
        { "mDataProp": "col4" },    // 4
        { "mDataProp": "col5" },    // 5 
        { "mDataProp": "col6" },    // 6
        { "mDataProp": "col7" },    // 7
        { "mDataProp": "col8" },    // 8 
        { "mDataProp": "col9" }     // 9 - Column Array Index Position
    ],
    "oLanguage": {                          // Internationalisation: http://datatables.net/ref#oLanguage
        "sLengthMenu": $("#ressLengthMenu").text(),
        "sZeroRecords": $("#ressZeroRecords").text(),
        "sInfo": $("#ressInfo").text(),
        "sInfoEmpty": $("#ressInfoEmpty").text(),
        "sEmptyTable": $("#ressEmptyTable").text(),
        "sLoadingRecords": $("#ressLoadingRecords").text(),
        "sProcessing": $("#ressProcessing").text(),
        "oPaginate": {
            "sFirst": $("#ressFirst").text(),
            "sLast": $("#ressLast").text(),
            "sNext": $("#ressNext").text(),
            "sPrevious": $("#ressPrevious").text()
        }
     },
     "fnServerData": function ( sSource, aoData, fnCallback ) {
         $.ajax( {
           "dataType": 'json',
           "type": "POST",
           "url": sSource,
           "data": aoData,
           "success": fnCallback
         } );
     }
});

任何信息表示赞赏

4

1 回答 1

0

您可以尝试将bAutoWidth选项设置为 false。

于 2013-04-10T03:04:42.247 回答