How to pass a parameter to a dialog (RadWindow) - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

How to pass a parameter to a dialog (RadWindow)

  • How to pass a parameter to a dialog (RadWindow)
  • 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,
  • 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");
  • Thanks. Perfect solution.