How to pass a parameter to a dialog (RadWindow)

Posted by Community Admin on 05-Aug-2018 14:19

How to pass a parameter to a dialog (RadWindow)

All Replies

Posted by Community Admin on 09-Jun-2011 00:00

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,

Posted by Community Admin on 10-Jun-2011 00:00

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");

Posted by Community Admin on 25-Apr-2013 00:00

Thanks. Perfect solution.

This thread is closed