We are upgrading to version 4.0 of the telerik controls and for some reason the RadWindow Modal option does not work (ie of course).

We have all of our windows defined in our masterpage and we open them by executing javascript on a button click in a user control.

<radW:RadWindowManager ID="RadWindowManager1" runat="server" Behavior="none" Skin="Outlook" Modal="true"
        VisibleStatusbar="False" VisibleTitlebar="false">
    <Windows>
        <radW:RadWindow ID="Help" runat="server" Title="Help" Height="600" Width="975" ReloadOnShow="True"
            Modal="True" OnClientClose="InvolvementCallBackFunction" OnClientShow="OnClientShow" OnClientPageLoad="OnClientPageLoad" ShowContentDuringLoad="false" />
    </Windows>
</radW:RadWindowManager>

Js

function ShowPopupForm(location, formName, returnValue) {
    var oManager = GetRadWindowManager();
    var oWnd = oManager.getWindowByName(formName);
    oWnd.set_modal(true);
    oWnd.setUrl(location);
    oWnd.show();
    return returnValue;
}

After the button is clicked the window displays, however it is not modal!

Oddly enough I can get this to work if everything is in the same page and I use the OpenerElementID attribute.

Any ideas?

有帮助吗?

解决方案 2

Ok I got it!

Telerik does not like it if you have a self closing div tag in your html page. (In ie anyways)

BAD

<div />

GOOD

<div></div>

其他提示

This is some odd behavior. Have you tried examining your page's CSS to see if some of your own stylesheets interefere with the Telerik classes? Try disabling all your own CSS and see if it fixes the modality. I also do not think the set_modal(true) call is necessary, as the Modal property is already set to true in the markup.

Also, another thought comes to mind - if you have more than one manager GetRadWidnowManager() might be returing a reference to the other that is not modal. Take a look at this article that explains such a scenario, it's been a lifesaver.

You can also try removing your event handlers for testing and see if something in them changes the modality and/or throws a JS error under IE.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top