This is a migrated thread and some comments may be shown as answers.

Problem with compatibitly view and lightweight

20 Answers 215 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 26 Feb 2015, 07:45 AM
Hi,

We are only using lightweight as render mode on all your controls.
We have also done a lot of "hacks" (because of issues) and normal css-styling of your controls that are heavily depending on lightweight as render mode.
What I want to say is that going back to classic mode is not even close to an option...

But in recent releases (starting with 2014 Q2), this mode is completely broken if users run IE in the evil Compatibilty Mode.
Even if setting the control to lightweight, it renders classic mode!!!

This can be easily tested in your demo, for example this will render classic if running IE in Compatibility Mode:
http://demos.telerik.com/aspnet-ajax/window/examples/rendermode/defaultcs.aspx

We are also setting the X-UA-Compatible to IE=Edge to force IE to at least use the correct Document Mode...

Regards
Andreas

20 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 02 Mar 2015, 01:39 PM
Hello Andreas,

When the browser is in compatibility mode it is treated as IE7 where the Lightweight is not supported and Classic rendering is used instead.

Regards,
Peter Filipov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Andreas
Top achievements
Rank 1
answered on 03 Mar 2015, 08:39 AM
Well that is really bad news...

Since we are setting the X-UA-Compatible to IE=Edge, the compatibilty view should work just fine with lightwieght!
I thought that this behavior only was intended to happen when setting RenderMode to Auto?

Other controls that we have made ourself (same pattern as you are using in Lightweight) are working just fine in compatibitly view when setting X-UA-Compatible to IE=Edge!!!

Even tried to override the ResolvedRenderMode in your controls and that makes it work just fine, the lightweight mode works as expected. The only problem is that some controls has inner controls that we can't override...

Regards
Andreas
0
Peter Filipov
Telerik team
answered on 04 Mar 2015, 05:18 PM
Hi Anreas,

We are going to discuss your suggestion not to fallback to Classic mode. In the distributed source code of the control and you could change the code base and build a custom DLL as a temporary solution.
The files that you need to change are:
RadCompositeDataBoundControl.cs
RadDataBoundControl.cs
RadWebControl.cs


Change the implementation of the CanRenderInMode method.

Regards,
Peter Filipov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Andreas
Top achievements
Rank 1
answered on 05 Mar 2015, 12:55 PM
Well that works for now...

I sure hope you make the right decision here, otherwise we will have to code for IE7 for the rest of our life...
At least as an option!

Regards
Andreas
0
Peter Filipov
Telerik team
answered on 10 Mar 2015, 09:41 AM
Hi Andreas,

We have discussed the topic and decided not to make such changes, because there are many people which heavily depend on that behavior and it will be a breaking change. As a solution of your case you could use the approach described in my previous post. 

Regards,
Peter Filipov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Andreas
Top achievements
Rank 1
answered on 10 Mar 2015, 12:05 PM
Hi,

This was really bad news...
Can't we at least get it as an option (or if we can override some property) so we don't have to make changes and recompile the entire source code every time!

Making such manual changes are doomed to fail at some time, so probably we wont be using new versions as often as before...

One bad thing is also that we always tries out your beta versions, that wont be possible anymore (if you don't supply source code for betas also)!

Regards
Andreas
0
Peter Filipov
Telerik team
answered on 13 Mar 2015, 08:20 AM
Hello Andreas,

We are looking for a solution for the near future but for the next couple of releases you should apply the approach described below. Our ultimate goal is to separate the classic and lightweight rendering and the customers to use only one of them.

Regards,
Peter Filipov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Tanya Wheatley
Top achievements
Rank 1
answered on 15 Aug 2016, 04:44 PM

Hi,

Has this issue now been resolved and part of the core build?

Would you be able to provide an update.

Many thanks in advance.

 

0
Marin Bratanov
Telerik team
answered on 16 Aug 2016, 08:14 AM

Hello Tanya,

For the time being such a facility is not planned. Use cases are quite limited and demand is low, while a change would be a breaking change and is likely to introduce problems for people who never had them.

I must, once again, note that the IE Compatibility View is not supported and there are ways to avoid it.

Regards,

Marin Bratanov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Andreas
Top achievements
Rank 1
answered on 27 Sep 2016, 06:25 AM

Hi,

Well the "ways to avoid it" has proven almost impossible for us! If you are taking about telling thousands of end users to stop using Compatibility View or even in a corporate environment it is really hard to make them push out gpo:s to avoid this evil thing...

For now, we are forced to make change in the telerik source code and compile manually each release, which is really annoying!

We have to change this in RenderModeBrowserAdaptor.cs:

public virtual bool IsModernBrowser
{
  get
  {
    return true; //(!IsBrowser("IE") || Version >= 8);
  }
}

And setting the X-UA-Compatible to IE=Edge...

Can't you make this as an option at least (ForceModernBrowser or something)?

So we don't have to recompile each release, or even start using nuget...

Regards
Andreas

0
Genady Sergeev
Telerik team
answered on 04 Oct 2016, 03:03 PM
Hi Andreas,

We will change the behavior so that hardcoded RenderMode.Lightweight won't fallback to Classic but will stay as it is for the use case where there is X-UA-Compatible header set on the server-side. This will resolve the issue.

Can you confirm that in your scenario you set the X-UA-Compatible on the server? As far as we know this is the only case where one can override the built-in IE preferences for compatibility view.

Regards,
Genady Sergeev
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Andreas
Top achievements
Rank 1
answered on 06 Oct 2016, 07:24 AM

Hi!

Yes we are setting the X-UA-Compatible in our page base class like this in Page_Render:

Response.AddHeader("X-UA-Compatible", "IE=Edge");

We can set it earlier if that will be needed for this to work...

Regards
Andreas

0
Genady Sergeev
Telerik team
answered on 13 Oct 2016, 07:56 AM
Hi Andreas,

We will post instructions when ready. I will update this thread by then.

Regards,
Genady Sergeev
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Jae Hong
Top achievements
Rank 1
answered on 06 Dec 2016, 08:42 PM

Hi Andreas,

This is what I am looking for and would like to know how to override IsModernBrowser property.

many thanks!!

Jae

0
Genady Sergeev
Telerik team
answered on 12 Dec 2016, 03:12 PM
Hi Jae,

You can create your own control that inherits from the given RadControl and override its PreferredRenderMode method.

Regards,
Genady Sergeev
Telerik by Progress
Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
0
Marin Bratanov
Telerik team
answered on 10 Jan 2017, 11:57 AM

Hi all,

I am happy to announce that this change has been implemented and will be released in R1 2017: https://feedback.telerik.com/Project/108/Feedback/Details/205093-lightweight-rendermode-will-not-fall-back-to-classic-when-the-x-ua-compatible-hea.

Here is the documentation change that explains the new behavior as well: https://github.com/telerik/ajax-docs/commit/6c8796b5ddd773d0f198a3f96acab584a4fe22b9.


Regards,

Marin Bratanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Michal
Top achievements
Rank 1
Iron
Iron
answered on 23 Mar 2017, 03:40 PM

Hi,

 we are facing same problems, with rendering mode switching.

Looks like it was updated ONLYfor "C#" version. If you start telerik website project with masterpage in VB, it renders differently(including webresource.axd content), than in C#(takes me 2 days to figure out whats wrong)

EDGE/CHROME in VB(classic) vs C#(ok) site. So we have another dimension.... :P

Is there something specific to setup differently for VB or C# project? Or how to force lightweightrendering mode?

0
Simon Vane
Top achievements
Rank 1
answered on 05 Jul 2017, 09:40 AM
Please note, the code does a case sensitive compare of "IE=Edge" of the X-UA-Compatible header so the value must be "IE=Edge" not "IE=edge".

This conflicts with the Microsoft documentation - https://msdn.microsoft.com/en-us/library/ff955275(v=vs.85).aspx

This is a bug and the code should be doing a cases insensitive compare I think.

Also note that the header needs to be added early in the page lifecycle in WebForms before the controls are created e.g. PreInit.
0
Marin Bratanov
Telerik team
answered on 05 Jul 2017, 02:57 PM

Simon is right.

We will fix the check for our next release - the default string will be IE=edge and it will also be case-insensitive.

--Marin

0
Simon Vane
Top achievements
Rank 1
answered on 05 Jul 2017, 03:47 PM
Thanks Marin.
Tags
General Discussions
Asked by
Andreas
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Andreas
Top achievements
Rank 1
Tanya Wheatley
Top achievements
Rank 1
Marin Bratanov
Telerik team
Genady Sergeev
Telerik team
Jae Hong
Top achievements
Rank 1
Michal
Top achievements
Rank 1
Iron
Iron
Simon Vane
Top achievements
Rank 1
Share this question
or