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

radajaxloadingpanel only with postback

1 Answer 44 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 13 Sep 2013, 12:07 PM
Hello Community,

maybe i misunderstood the radajaxloadingpanel control... So i try to explain my request.

On my Site i have a Button who opens a RadWindow (like this KreditberechnungErgebnis.OpenerElementID = lbBerechnen.ClientID).
So it does a Postback and i do something code behind.

At this Point i just want to bridge over the Postback for my Users, with the radajaxloadingpanel.
I don't want to reload any Controll on my Site.

My Code look like this:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        var currentLoadingPanel = null;
        var currentUpdatedControl = null;
        function RequestStart(sender, args) {
            currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
 
            if (args.get_eventTarget() == "<%= lbBerechnen.UniqueID%>") {
                currentUpdatedControl = "<%= tabBearbeitung.ClientID%>";
            }
            //show the loading panel over the updated control
            currentLoadingPanel.show(currentUpdatedControl);
        }
        function ResponseEnd() {
            //hide the loading panel and clean up the global variables
            if (currentLoadingPanel != null)
                currentLoadingPanel.hide(currentUpdatedControl);
            currentUpdatedControl = null;
            currentLoadingPanel = null;
        }
    </script>
</telerik:RadCodeBlock>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="lbBerechnen">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="tabBearbeitung" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
    <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>

<asp:LinkButton runat="server" Width="100px" ID="lbBerechnen" CssClass="button-theme">
            <span class="span_outer">
                <span class="span_right">
                    <span class="span_left">
                        <span style="width: 92px;" class="span_inner">Berechnen</span>
                    </span>
                </span>
            </span>
    </asp:LinkButton>


I actually don't want this:

currentUpdatedControl = "<%= tabBearbeitung.ClientID%>";

BTW, it does not work like anyway. :)

Sorry for my bad Englich, i hope you understand me. If not i will try to explain it again.

Thank you!
Daniel

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 18 Sep 2013, 01:34 PM
Hello Daniel,

From the provided information I am not able to fully understand the functionality that you want to achieve. 

Nevertheless, when you are setting the "LinkButton" control as opener element of the "RadWindow", the button is no longer doing postback on click. You could however overcome that limitation by handling the "OnClientClick" client-side event of the "LinkButton" and fire AJAX request through the "RadAjaxManager" with the "LinkButton.UniqueID" as parameter:
function buttonClick() {
    var radAjaxManager1 = $find("<%= RadAjaxManager1.ClientID %>");
    radAjaxManager1.ajaxRequestWithTarget("<%= lbBerechnen.UniqueID %>", "");
}

If the above does not solves the issue for you, please elaborate about the requirement you have and preferable open a regular support ticket with a sample, runnable project that isolates the problematic for further inspection.

 

Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Ajax
Asked by
Daniel
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or