Prevent RadWindow from closing

4 posts, 0 answers
  1. Cyrus
    Cyrus avatar
    52 posts
    Member since:
    Apr 2008

    Posted 05 Apr 2010 Link to this post

    I have been having some issues using the RadWindow as a container with a custom control.  The control has a button that searches Active Directory users and it populates a listbox.  The indexchange event of the list box should close the window and return properties of the user selected.  However, whenever I click the button to search for a user, the window closes.  How can this be prevented?

    <telerik:RadWindow runat="server" Behavior="Default" InitialBehavior="None" Left="" 
            Style="display: none;" Title="User Search" Top="" ID="popupSearch" OpenerElementID="btnSearch" 
            Behaviors="Close, Move" Height="325px" Width="350px" Modal="True">  
            <ContentTemplate> 
                <cc1:UserSearchBox ID="UserSearchBox1" runat="server"></cc1:UserSearchBox> 
            </ContentTemplate> 
        </telerik:RadWindow> 
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 06 Apr 2010 Link to this post

    Hi Cyrus,

    If you are making a postback when you click the "Search for user" button, such behavior is expected - the page is reloaded so any dynamically created HTML element will be destroyed. To avoid that you could Ajaxify the button.
    If this is not the case, please open a support ticket and send a small sample project so we could get a better view over your exact setup and code logic.

    Kind regards,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Cyrus
    Cyrus avatar
    52 posts
    Member since:
    Apr 2008

    Posted 07 Apr 2010 Link to this post

    Thanks, I abandoned trying to make this work and went with a separate page to open and do the work.  Now I am having all sorts of issues trying to pass items from the dialog page back to the parent page.  I am not well versed in JavaScript and that is what I try to avoid using your controls.  Anyway, this control really is a pain to deal with, I wish it was easier to pass items back and forth.
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 08 Apr 2010 Link to this post

    Hello Cyrus,

    When you use RadWindow to display a content page, the control uses an IFRAME and behaves just like one. Because the parent and the content page are separate ones, the communication between them is done either on the client (via JavaScript) or you could use the Session to transfer arguments back and forth.
    I don't know what your exact problems are, but I suggest to implement your logic not by using RadWindow but a standard popup (window.open()). Once you have your code working as expected, the same logic will work with RadWindow as well.


    Kind regards,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top