vendredi 31 juillet 2015

RadAjaxManager OnRequestStart is not fired when press for the second time on a button?

RadAjaxManager OnRequestStart is not fired when press for the second time on a button.

1. Button post back working good. 2. No javascript error.

Code Here:

Rad code block

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            var currentLoadingPanel = null;
            var currentUpdatedControl = null;
            var btn1 = $find("<%= btnsave.ClientID%>");
            function requestStart(sender, args) {
                currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID%>");
                btn1 = $find("<%= btnsave.ClientID%>");
                if (args.get_eventTarget() == "<%= btnsave.UniqueID %>") {
                    currentUpdatedControl = "<%= importprocess.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="btnstart">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="importprocess" />
                </UpdatedControls>
            </telerik:AjaxSetting>
              <telerik:AjaxSetting AjaxControlID="btnsave">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="btnsave" ></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
         <ClientEvents OnRequestStart="requestStart" OnResponseEnd="responseEnd"></ClientEvents>
    </telerik:RadAjaxManager>

RadAjaxLoadingPanel

Aucun commentaire:

Enregistrer un commentaire