Question

i'm using the datatable plugin, i am rendering the datatable in a dialog. inside firefox the datatable is appearing nicely over dialog. But in IE datatable is not at all displaying properly. in IE scrollbar is coming for dialog not for datatable, the whole UI is looking ugly, eventhough the table width grows beyond the dialog width and height, scrollbar is not at all appearing.

Here is my code.

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) {

            }


        });

    });

Here is my Aspx div in which i'm rendering the datatable

 <div id="placeholder" style="width:320px">
            </div>
Was it helpful?

Solution

It was compatibility issue, refer for more info http://blogs.msdn.com/b/askie/archive/2009/03/23/understanding-compatibility-modes-in-internet-explorer-8.aspx

Just added <meta http-equiv="X-UA-Compatible" content="IE=7; IE=8" /> in site.master,it worked

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top