Question

I made it work but I want to know why it is happening)

So I have my rad window:

<telerik:RadWindowManager ID="wndManager" runat="server">
        <Windows>
            <telerik:RadWindow ID="rwShippingAddressEdit" runat="server" Modal="True" VisibleStatusbar="False"  VisibleOnPageLoad="false" ShowContentDuringLoad="false">
                <ContentTemplate>
                    //content
                </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

And I have my button to open it:

   <telerik:RadButton ID="" Width="90" CssClass="button-next" runat="server" 
     ID="btnOpen" OnClientClicking="windowOpen" Text="Open" />


        function windowOpen(sender, args) {
            var oManager = GetRadWindowManager();
            oManager.open(null, "rwShippingAddressEdit");
            args.set_cancel(true);
        }

This code shows regular default blank window but on another page the same code works perfectly fine and opens window with my content.

In order to make it work I added this code to page_load event

rwShippingAddressEdit.OpenerElementID = btnOpen.ClientID;

And now when I press btnOpen it opens two windows (blank one and window with content). Both pages inherit same master page, I do not work with rad window in code behind. But somehow same code works different on pages pages. What can the problem be?

It's not about validators. I tried CausesValidation="False" for btnOpen. So, if you have any ideas I would be glad to hear)

Was it helpful?

Solution

Try this alternative and see if you have a better results:

var oWnd = $find("<%=rwShippingAddressEdit.ClientID%>");
oWnd.show();

Don't set the OpenerElementID with this approach to verify it does work.

OTHER TIPS

I would guess you have several managers on the page and radopen() is not using the one you expect, read more here: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-wrong-window-opened.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top