Ticket Q460128
Visible to All Users
Duplicate

How to use SetIECompatibilityModeEdge method

created 12 years ago

[DevExpress Support Team: CLONED FROM KA18646: How to adjust DevExpress ASP.NET controls when opening a page in the Internet Explorer Compatibility Mode]
I'm still confused what this actually *does*. The documentation says "switch all DevExpress ASP.NET controls on the specified page to use the specified IE version (i.e. inform them on the server side to prepare corresponding HTML rendering)." And yet, when I throw an aspxgridview on a page and call DevExpress.Web.ASPxClasses.ASPxWebControl.SetIECompatibilityModeEdge, the rendered HTML is different when I set compatibility mode in the browser. What I *thought* it would do is send the same HTML to IE 9, regardless of what Browser Mode it is in. Does this method NOT do that? If it doesn't, how *can* I tell the controls to render for the "real" version of IE? The problem of course is, if I have this: <meta http-equiv="X-UA-Compatible" content="IE=edge" /> on my page, then the document mode is REAL IE 10 (let's say), but the DevEx controls are sending HTML that is correct for IE7 *NOT* IE 10.

Answers approved by DevExpress Support

created 12 years ago (modified 11 years ago)

Hello,
>>What I *thought* it would do is send the same HTML to IE 9, regardless of what Browser Mode it is in.
If a site/page is configured to display content in a Compatibility Mode (and the actual Document Mode is less than the major browser version), it is necessary to render the corresponding HTML content and use the corresponding DOM API.
>>Then the document mode is REAL IE 10 (let's say), but the DevEx controls are sending HTML that is correct for IE7 *NOT* IE 10.
If this does not work for you, please provide us with a sample running project and illustrate actual/expected results with some screenshots.

    Show previous comments (2)
    T T
    THE Timothy Clark 12 years ago

      Well, I'm not talking about IE 7. I am talking about IE 9 in ***Compatibility Mode***, which makes the *Browser Mode* IE 7. Please see: http://blogs.msdn.com/b/ie/archive/2010/10/19/testing-sites-with-browser-mode-vs-doc-mode.aspx.
      "The Browser Mode determines
      User-Agent (UA) string that IE sends to servers
      Document Mode IE defaults to
      Conditional Comments that IE evaluates"
      "IE9 Compatibility View
      IE9 reports a UA string, version vector, and document mode, as if it is IE7; however, the UA string also includes the Trident/5.0 token indicating that the browser is really IE9. Use this mode to test how IE9 users experience your site if they click on the Compatibility View button."
      Does my question make sense now?

      T T
      THE Timothy Clark 11 years ago

        Sorry, guys. My bad. It *is* working as expected. I was switching my Browser To IE 7 Mode, not "IE 9 Compat View" I assumed that both versions would send the Trident header in the user agent string. Turns out that that's not the case. You have to actually be in "Compat View" for it to send the Trident header. Didn't realize that. So this *is* working exactly as I hoped it would. Thanks!

        Anthony (DevExpress Support) 11 years ago

          Hi,
          Thank you for letting us know that the issue has been resolved.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.