ajax functionality not working

4 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 29 Jan 2011 Link to this post

    I have a combo box on a page with some code in the sekectedindexchanged event (this populates a second combo based on the contents of the first)

    Whenever I select an item in the first combo box, it initiates a full page postback despite it being setup in an ajax proxy manager, am I doing something wrong ?

    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadAjaxManagerProxy1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadComboBoxType" />
                                <telerik:AjaxUpdatedControl ControlID="RadComboBoxArtistGenre" />
                            </UpdatedControls>
                </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBoxType">
                <updatedcontrols>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBoxType"
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </updatedcontrols>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBoxArtistGenre">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBoxArtistGenre"
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
             
             
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

    <div class="cellArtistControl">
                     
                    <telerik:RadComboBox ID="RadComboBoxType" Runat="server"
                            Skin="Vista" 
                            Width="250px"
                            onselectedindexchanged="RadComboBoxType_SelectedIndexChanged"
                            AutoPostBack="True">
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                 </telerik:RadComboBox>
                  
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                ControlToValidate="RadComboBoxType" ErrorMessage="*" Font-Bold="True"
                                InitialValue="-- Select A Type --" ValidationGroup="ArtistValidation"></asp:RequiredFieldValidator>
                    </div>
                <div class="cellArtistControl">
                 
                    <telerik:RadComboBox ID="RadComboBoxArtistGenre" runat="server" Skin="Vista" Width="250px">
                        </telerik:RadComboBox>
                 
                    </div>
                </div>

  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 02 Feb 2011 Link to this post

    Hello mww,

    Your RadAjaxManagerProxy configuration looks OK, so there must be something else causing this.

    Can you please try removing the RequiredFieldValidator and let me know what is the behavior then?

    Best wishes,
    Simon
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 05 Feb 2011 Link to this post

    Ive done that and its still exactly the same, the progress indicator just doesnt show.  Heres the source code

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TalentSearchEnquiry.ascx.cs" Inherits="Studio1Website.UserControls.TalentSearchEnquiry" %>
    <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
    <script type="text/javascript">
        // on upload button click temporarily disables ajax to perform
        // upload actions
        function conditionalPostback(sender, args)
        {
            if (args.get_eventTarget() == "<%= ButtonUploadImage.UniqueID %>")
            {
                args.set_enableAjax(false);
            }
            if (args.get_eventTarget() == "<%= ButtonAudioUpload.UniqueID %>") {
                args.set_enableAjax(false);
            }
             
        }
    </script>
    </telerik:RadScriptBlock>
     
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="400px" Width="100%" ClientEvents-OnRequestStart="conditionalPostback">
     <telerik:RadProgressManager ID="RadProgressManager1" runat="server"
        EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False"
        Skin="Vista" />
         
               
    <div id="quick-form">
        <h1>New Artist Registration Enquiry </h1>
         
            <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Height="400px"
                Width="474px" onnextbuttonclick="Wizard1_NextButtonClick"
                DisplaySideBar="False">
                <StartNavigationTemplate>
                     
                        <asp:Button ID="StartNextButton" runat="server" CommandName="MoveNext" Text="Next" width="100px"/>           
                     
                </StartNavigationTemplate>
                <WizardSteps>
                    <asp:WizardStep ID="WizardStep1" runat="server" StepType="Start" title="">
                        <asp:Panel ID="Panel1" runat="server" Height="300">
                        <p><label for="name" >Name of band/act - your stage name*</label></p>
                             <telerik:RadTextBox ID="RadTextBoxEnquiryArtistName" runat="server" Skin="Default"
                                 Width="300px">
                             </telerik:RadTextBox>
                           
                          <p>
                             
                          </p><br />
                           
                          <p><label for="name" >Artist Contact First Name*</label></p>
                             <telerik:RadTextBox ID="RadTextBoxEnquiryArtistContactFirstName" runat="server" Skin="Default"
                                 Width="300px">
                             </telerik:RadTextBox>
                           
                          <br />
                           
                          <p><label for="name" >Artist Contact Last Name*</label></p>
                             <telerik:RadTextBox ID="RadTextBoxEnquiryArtistContactLastName" runat="server" Skin="Default"
                                 Width="300px">
                             </telerik:RadTextBox>
                           
                          <br />
                           
                           
                          <p><label for="name" >Email Address*</label></p>
                             <telerik:RadTextBox ID="RadTextBoxEnquiryEmail" runat="server" Skin="Default"
                                 Width="300px">
                             </telerik:RadTextBox>
                              
                              
                              
                             <br />
                           <p><label for="name" >Telephone/Mobile *</label></p>
                           <telerik:RadTextBox ID="RadTextBoxEnquiryTelephone" runat="server" Skin="Default"
                                 Width="300px">
                           </telerik:RadTextBox>
                           <br />
                         
                        </asp:Panel>
                         
                    </asp:WizardStep>
                    <asp:WizardStep ID="WizardStep2" runat="server" title="">
                        <asp:Panel ID="Panel2" runat="server" Height="300">
                        <p><label for="name" >Website (if you have one)</label></p>
                             <telerik:RadTextBox ID="RadTextBoxWebsite" runat="server" Skin="Default"
                                 Width="300px">
                             </telerik:RadTextBox>
                           
                          <br />
                          <p><label for="name" >Please provide a brief description of your act/band*</label></p>
                             <telerik:RadTextBox ID="RadTextBoxBiography" runat="server" Skin="Default"
                                 Width="300px" TextMode="MultiLine" Height="150px">
                             </telerik:RadTextBox>
                           
                          <br />
                           
                          <p><label for="name" >If you have a video on Youtube, please copy and paste the link here.</label></p>
                             <telerik:RadTextBox ID="RadTextBoxYoutubeLink" runat="server" Skin="Default"
                                 Width="300px" TextMode="SingleLine" >
                             </telerik:RadTextBox>
                           
                          <br />
                        </asp:Panel>
                             
                             
                    </asp:WizardStep>
                    <asp:WizardStep ID="WizardStep3" runat="server" Title="" >
                    <asp:Panel ID="Panel3" runat="server" Height="300px">
                        <h2>Please upload an image</h2>
                        <p>(.jpg,.jpeg,.gif,.png)</p>
                        <br />
                        <div class="row_upload">
                        <telerik:RadUpload
                            ID="RadUploadImage" runat="server"
                            Skin="Vista"
                            MaxFileInputsCount="1"
                            TargetFolder="~/Uploads"
                            OverwriteExistingFiles="true"
                            AllowedFileExtensions=".jpg,.jpeg,.gif,.png"
                            ControlObjectsVisibility="None" MaxFileSize="10000000"
                            Culture="English (United Kingdom)" >
                        </telerik:RadUpload>
                    </div>
                    <br /> 
                    <asp:Button ID="ButtonUploadImage" runat="server" Text="Upload"  onclick="ButtonUploadImage_Click" CausesValidation="False" />             
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:Image ID="ImageRegistration" runat="server" Visible="False" />
                    </asp:Panel>          
                         
                                           
                         
                    </asp:WizardStep>
                    <asp:WizardStep ID="WizardStep4" runat="server" Title="" >
                    <asp:Panel ID="Panel5" runat="server" Height="300px">
                        <h2>Please upload an audio file (.mp3)</h2>
                        <br />
                        <p>(if you have provided a website that has audio clips, please skip this section)</p>
                        <br />
                        <br />
                        <div class="row_upload">
                        <telerik:RadUpload
                            ID="RadUploadAudio" runat="server"
                            Skin="Vista"
                            MaxFileInputsCount="1"
                            TargetFolder="~/Uploads"
                            OverwriteExistingFiles="true"
                            AllowedFileExtensions=".mp3"
                            ControlObjectsVisibility="None" MaxFileSize="10000000"
                            Culture="English (United Kingdom)" >
                        </telerik:RadUpload>
                        </div>
                    <br />
                      
                    <asp:Button ID="ButtonAudioUpload" runat="server" Text="Upload"  onclick="ButtonAudioUpload_Click" />             
                    <br />
                    <br />
                    <div class="row_upload">
                        <telerik:RadProgressArea ID="RadProgressArea1" runat="server" skin="Vista" ProgressIndicators="TotalProgressPercent">
                        </telerik:RadProgressArea>
                     
                     
                    </div>
                    </asp:Panel>          
                         
                                           
                         
                    </asp:WizardStep>
                    <asp:WizardStep ID="WizardStep5" runat="server" Title="" >
                     
                        <asp:Panel ID="Panel4" runat="server" Height="300px">
                        <p><asp:Literal ID="LiteralEndMessage" runat="server"></asp:Literal></p>             
                        <br />
                        <br />
                        <br />
                        <br />
                        <div class="clearfloats">
                        </div>           
                         <div class="submit_button">
                             <asp:Button ID="ButtonSubmit" runat="server" Text="Submit" onclick="ButtonSubmit_Click" ValidationGroup="RegistrationEnquiry" />
                              
                         </div>      
                        </asp:Panel>
                                           
                         
                    </asp:WizardStep>
                </WizardSteps>
                 
                <FinishNavigationTemplate>
                    <asp:Button ID="ButtonPrevious" runat="server" Text="Previous"  CommandName="MovePrevious"/>
                    <asp:Button ID="ButtonFinish" runat="server" Text="Finish" CommandName="MoveFinish"/>
                </FinishNavigationTemplate>
                 
                <StepNavigationTemplate>
                     
                    <asp:Button ID="StepPreviousButton" runat="server" CausesValidation="False" CommandName="MovePrevious" Text="Previous" Width="100px" />
                     
                    <asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" Text="Next" Width="100px" />
                     
                </StepNavigationTemplate>
                 
            </asp:Wizard>
        <br />
         
         
          <p>
          <br />
              <asp:Label ID="Label1" runat="server" Text="* Required" Visible="True"></asp:Label>
          </p>
       
       <p><label for="" > </label></p><br />
                                 
      <p>
          <asp:Label ID="LabelError" runat="server" Text="" ForeColor="Red" Visible="False"></asp:Label>
      </p
    </div>
     
     </telerik:RadAjaxPanel>
    <input id="HiddenImageURL" type="hidden" runat="server"/>
    <input id="HiddenAudioURL" type="hidden" runat="server"/>
    <input id="HiddenImagePath" type="hidden" runat="server"/>
    <input id="HiddenAudioPath" type="hidden" runat="server"/>

  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 13 Feb 2011 Link to this post

    Hello mww,

    With this code, there was an AJAX postback after I clicked on the 'Next' button.

    Only by debugging your initial setup I will be able to provide you with a more specific answer. Can you please upload a sample project that exhibits the behavior you reported with your first post and paste here a link to it so that I can download it and debug it?

    All the best,
    Simon
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top