+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How to show usercontrol in Popup window

How to show usercontrol in Popup window

5 posts, 0 answered
  1. Gaurav Mehta
    Gaurav Mehta avatar
    43 posts
    Registered:
    09 Dec 2009
    03 Sep 2010
    Link to this post
    Hi,

    We are using Sitefinity 3.6 SP1

    We would like to accomplish following things:
    We have 2 user controls : UserControl1, UserControl2

    UserControl1
    It has a Textbox. When user clicks on this textbox a Poup window with UserControl2 should open.

    UserControl2
    It should be opened inside Popup window.
    There are list of items with checkboxes.
    User can select item(s) by using checkbox and submit.
    On submit Popup window should close and all selected item should be in UserControl1' textbox.

    Please do let us know who we can do this.

    Regards,
    Gaurav
  2. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    03 Sep 2010
    Link to this post
    Hi there,

    It should be pretty easy. You need to create a page for the popup window (in case you are going for a popup not an overlay) and then add your usercontrol2 to the page. Then using Javascript you can pass values from the popup window to the parent using the "opener.document" to access the DOM of the parent.

    Best,

    G
  3. Gaurav Mehta
    Gaurav Mehta avatar
    43 posts
    Registered:
    09 Dec 2009
    03 Sep 2010
    Link to this post
    Hi G,

    Thanks for your reply.
    Yes you are right Infact that is how we normally do in other projects but I m not sure how we can do this using Sitefinity CMS page ?
    How to set a link to Sitefintiy CMS page from javascript ?

    Regards,
    Gaurav
  4. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    03 Sep 2010
    Link to this post
    Hi Gaurav Mehta,

    You can use the generic content to add the link and the relevant Javascript i.e.: to show the popup window. 

    Best,

    George
  5. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    03 Sep 2010
    Link to this post
    Hello,

    You can also use the RadWindow functionality to handle opening and closing of dialogs with returning close arguments. This demo samples exactly the desired functionalirty: Window / Returning Values from a Dialog.
    Regards,

    Radoslav Georgiev
    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
Register for webinar
5 posts, 0 answered