This is a migrated thread and some comments may be shown as answers.

Replacing ajax:DragPanelExtender with Telerik Radwindow

1 Answer 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Phuc
Top achievements
Rank 1
Phuc asked on 28 Mar 2016, 04:11 AM

At the current my website is using ajax:DragPanelExtender to show my grid data as a popup, and now I want to replace it with Telerik RadWindow to consistent with the UI of the website.

BUT, I still have not found a way to do it. Because ajax:DragPanelExtender is server-side while Radwindow is Client-side.
Is there any way that can solve my problem?

Please give me an advice.

Scenario: In my website, there is a button named "mybutton". When I hit it, ajaxToolkit:ModalPopupExtender will be shown my data under a popup.
Here is the code in my *.ascx file:

<asp:LinkButton ID="myHiddenControl" runat="server" Text=""></asp:LinkButton>
 
<ajaxToolkit:ModalPopupExtender runat="server"
    ID="myModalPopupExtender"
    TargetControlID="myHiddenControl"
    BehaviorID="programmaticModalPopup"
    PopupControlID="myPanel"
    BackgroundCssClass="modalBackground"
    DropShadow="True"
    RepositionMode="RepositionOnWindowScroll"
    DynamicServicePath=""
    Enabled="True">
</ajaxToolkit:ModalPopupExtender>
 
<asp:Panel runat="server"
    CssClass="modalPopup"
    ID="myPanel"
    Style="width: 440px; height: 500px; padding: 10px;" meta:resourcekey="Resource2">
 
    <div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <table>
                    <!-- show my data in a table -->
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Panel>

And here is vb code

Protected Sub mybutton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles mybutton.Click
    myModalPopupExtender.Show()
End Sub

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 28 Mar 2016, 06:30 AM

Hello,

You should use the ContentTemplate of the RadWindow to wrap your Panel control: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/getting-started/using-radwindow-as-controls-container.

To open it from the server, register a script as shown in this article: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/opening-from-the-server.

I also advise you review this one to see how to use it with AJAX requests: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/how-to/how-to-use-radwindow-with-ajax.

Regards,

Marin Bratanov
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Phuc
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or