Somnath
Somnath

Reputation: 3277

jqGrid - HeaderText of columns are not displayed properly

I have a jqGrid with fixed width of 445px. In all Version of IE (v6,v7,v8 and v9), HeaderText is not displayed properly. In other browsers it is working well. Any solution for this issue? enter image description here

Upvotes: 0

Views: 517

Answers (2)

Somnath
Somnath

Reputation: 3277

Well, it was a Doc type related issue. As I'm working with a component and do not have handle on page doc type so I tried to find a workaround. Now it is working well for me..

   // Soon after rendering the jqGrid do the following operation 
   if ($.browser.msie) {
        var mode = Visifire.Validator.msiemode();
        if (mode == 5) {
            // Applying workaround for HeaderText warping issue in IE
            var gridParent = vc_JQ(dataGridSettings.parentId);
            var gridHeader = vc_JQ(".ui-jqgrid-htable", gridParent);
            var headerTextDivs = vc_JQ("div.ui-th-div-ie", gridHeader);
            headerTextDivs.width('90%');
        }
    }

Upvotes: 0

Oleg
Oleg

Reputation: 221997

I recommend you to verify that the HTML file starts with <!DOCTYPE html ...: (<!DOCTYPE html> or <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> depend on the HTML or XHTML dialect which you use). Additionally I recommend you to verify whether the configuration of IE has activate the compatibility mode. If the compatibility mode are used the problem can be solved by including

<meta http-equiv="X-UA-Compatible" content="IE=edge" >

at the beginning of the <head> of the HTML page. I include the above line in all productive pages.

Upvotes: 2

Related Questions