You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: controls/render-modes.md
+51-1Lines changed: 51 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,17 @@ position: 10
14
14
15
15
Some of the Telerik controls support different rendering modes. They can change the actual **HTML** that is created to facilitate use of **CSS3**, semantic tags and modern skinning mechanisms. This is controlled through their **RenderMode** property.
***Classic** - this is the default value. It preserves the original rendering and styling that has been used before, which often means there are a lot of tables used to create layout, which results in nested elements and some markup that can be avoided.
20
30
@@ -39,6 +49,46 @@ You can find a list with the controls that support alternative render modes in t
39
49
>note Only one type of render mode is supported per page for each control type. For example, all RadDock controls on the page must have the same valueof the RenderMode property set. This includes instances from master pages, content pages and user controls.
40
50
41
51
52
+
## RenderMode Fallback Order
53
+
54
+
In some cases setting one value for the RenderMode may result in another mode being used by the controls. This is affected by the UserAgent string of the browser used to request the page. Here follows a list of the various possibilities and how you can affect or predict them.
55
+
56
+
### Classic RenderMode
57
+
58
+
If you explicitly set this mode, it will never change. It is always the last fallback options available.
59
+
60
+
### Lightweight RenderMode
61
+
62
+
This mode targets modern browsers (IE8+, Chrome, Firefox, Edge). If the requesting browser is IE7, the controls will fall back to the Classic RenderMode. This often happens if IE runs in Compatibility Mode.
63
+
64
+
As of R1 2017 you can avoid this by adding the `X-UA Compatible` header with value `IE=edge` to the response:
65
+
66
+
````web.config
67
+
<system.webServer>
68
+
<httpProtocol>
69
+
<customHeaders>
70
+
<add name="X-UA-Compatible" value="IE=Edge"/>
71
+
</customHeaders>
72
+
</system.webServer>
73
+
````
74
+
75
+
````Code-behind
76
+
Response.AddHeader("X-UA-Compatible", "IE=Edge");
77
+
````
78
+
79
+
### Mobile RenderMode
80
+
81
+
If the control does not support this mode, it will attempt to use the Lightweight mode.
82
+
83
+
When set explicitly, this mode will be used even for non-mobile browsers. It is recommended to use the Auto mode for such scenarios because the Mobile modes are tested and supported only under mobile devices.
84
+
85
+
### Auto RenderMode
86
+
87
+
This mode **attempts** to fall back to **Lightweight** in the majority of cases. The exceptions are:
88
+
89
+
* The requesting browser is IE7 and the version of the controls is older than R1 2017 and the `X-UA Compatible` header with value `IE=edge` is not set. In this case it will fall back to Classic.
90
+
91
+
* The requesting browser is identified as a mobile browser and the concrete control provides mobile-specific rendering. In this case it will fall back to Mobile.
0 commit comments