Telerik - z-order for the RadEditor FormatCodeBlock window

A common issue with Telerik layouts is that a customized RadMenu can float above everything else on the page. When that happens, other controls on the page have a tendency to pop up behind the menu.

This article shows two ways to correct the z-order so the editor’s dialogs display properly. The first method lowers the menu’s z-index and is the cleaner, recommended fix. The second method raises the dialog window with client script and is useful when you need more targeted control.

If your RadMenu sits above other controls, the simplest fix is to wrap the menu in a named div and assign a lower z-index. This forces the editor’s popup windows to appear above it.

<div id="RadMenuWrapper">
    <telerik:RadMenu ID="RadMenu3" runat="server"  Flow="Horizontal" CssClass="TabMenu">
        <Items>
        </Items>
    </telerik:RadMenu>
</div>

CSS

#RadMenuWrapper {
    position:relative;
    z-index:-100;
}

 

Before I standardized on the CSS approach, I used a client-side handler to bump the z-index of specific RadEditor dialogs. This method still works and is useful if you only want to adjust certain windows.

<telerik:RadEditor ID="RadEditor1" runat="server" OnClientCommandExecuted="OnClientCommandExecuted">
 </telerik:RadEditor>
    
<script type="text/javascript">
function OnClientCommandExecuted(editor, args)
{
   var commandName = args.get_commandName();
   if (commandName == "ImageManager")
   {
     var wnd = editor.get_dialogOpener()._dialogContainers[commandName];//get reference to the RadWindow object
     wnd.get_element().style.zIndex = "9999"
   }
   if (commandName == "FormatCodeBlock")
   {
     var wnd = editor.get_dialogOpener()._dialogContainers[commandName];//get reference to the RadWindow object
     wnd.get_element().style.zIndex = "9999"
   }
}
 
</script>

 

Both methods solve the z-order issue, but lowering the menu’s z-index is cleaner and avoids maintaining client script. Use the JavaScript approach only if you need fine-grained control over individual dialogs.


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences