ISSUE & RESOLUTION: The Rad Menu control Overlap other controls

本文详细介绍了如何通过调整z-index属性解决RadMenu与RadWindow在ASP.NET AJAX页面上的重叠问题,包括使用RadMenu和RadWindowManager的两种不同设置方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://www.telerik.com/support/kb/aspnet-ajax/window/show-radwindow-above-radmenu.aspx

ISSUE:

I have the problem that when the Rad Menu is in the aspx page after other controls like dropdown control or Listbox, the Rad menu overlap the items in the other controls and some ones cannot be selected. Please see the attachment . How can I avoid this problem??

RESOLUTION:

There are numerous different scenarios and in some of them it is necessary to display a RadMenu control above a RadWindow and in others you may need to do the contrary. You can determine which control to be shown above another one by setting proper z-indexes. 

In the specific case which this article is related to you can use two approaches to set the corresponding z-indexes:

  1. Set a lower z-index to the RadMenu.
  2. Set a bigger z-index to the RadWindow but this will work only in case you are using the RadWindowManager control.

Since the Q1 2008 Release this can be easily achieved by setting the desired z-index in the particular control's style attribute as explained here. As explained in the article, the default z-index of the RadMenu is 7000 and the RadWindow's one (when using RadWindowManager) is 3000.

This being said the necessary settings for the both approaches should be as the following ones:

  1.  Set a lower z-index to the RadMenu:

     <telerik:radmenu runat="server" id="appMenu"   
            style="z-index:2900"
  2. Set a bigger z-index to the RadWindowManager as shown below:

      <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Style="z-index: 7001">  
                <Windows> 
                    <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true" Modal="true">  
                    </telerik:RadWindow> 
                </Windows> 
            </telerik:RadWindowManager> 

You can find sample demo projects in the attached archive files.

Please note the following:

  1. You can set the z-index for all controls in the explained manner only if you are using RadControls for ASP.NET AJAX Q1 2008 Release or a later version.
  2. style="z-index:<some value>" can be set to the RadWindowManager only, not to theRadWindow control itself. This is because the z-index of the different RadWindows is dynamically changed - even if you have a RadWindow with z-index 100, it will be displayed over other RadWindows with higher z-index value, if active.

 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值