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

Forums / Sitefinity SDK / How to pass a parameter to a dialog (RadWindow)

How to pass a parameter to a dialog (RadWindow)

3 posts, 0 answered
  1. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    09 Jun 2011
    Link to this post
    Hello,

    I have a custom widget that has a RadGrid. When I double click a row I want to open up a dialog window. For that I have created a custom dialog based on AjaxDialogBase and registered in Sitefinity. Now I want to pass the row  ID from the custom widget to this dialog. How should I do that? Following is the code I have on my custom widget to show the dialog.

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function ShowDetails(id) {
      
            this._window = $find('<%=RadWindowManager1.ClientID %>').GetWindowByName("BugDetails");
              
            this._window.Show();
        }
    </script>
    </telerik:RadCodeBlock>

    This is my RadWindowManager code.

    <telerik:RadWindowManager ID="windowManager" runat="server" Skin="Sitefinity">
                        <Windows>
                            <telerik:RadWindow ID="BugDetails" Width="620" Height="500" NavigateUrl="~/Sitefinity/Dialog/BugDetailsDialog" runat="server" ReloadOnShow="true"
                             Modal="true" VisibleStatusbar="false" Behaviors="Close" >
                            </telerik:RadWindow>
                        </Windows>
        </telerik:RadWindowManager>


    Thanks,
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    10 Jun 2011
    Link to this post
    What if you set the navigate URL in javascript to pass along a querystring var which can be picked up in the windows page?

    this._window.setUrl("http://www.site.com?id=5");
  3. jay taylor
    jay taylor avatar
    1 posts
    Registered:
    11 Oct 2009
    25 Apr 2013 in reply to Steve
    Link to this post
    Thanks. Perfect solution.
3 posts, 0 answered