Updatepanel only working on initial postback

5 posts, 0 answers
  1. Axel
    Axel avatar
    41 posts
    Member since:
    Jul 2009

    Posted 08 Dec 2009 Link to this post

    Hi,

    I am trying out the AjaxLoadPanel for the first time. I want a wait msg to appear after I click my search image-button while my Radgrid is loading. This works the first time I search after loading the page, but not the second time. I am sure I am making a beginner mistake somewhere.

    btw. If I create another AjaxSetting with my ImgButton as trigger and my Radgrid as updatecontrol then I get a error complaining that my control contains code blocks. This happens even if I wrap it with an asp:panel, and yes I have to script in my header.

    Hope someone can help me out here :-)

    Axel

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"   
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="UserControlContainer">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="UserControlContainer" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
    </telerik:RadAjaxManager> 
     
     <asp:Panel id="UserControlContainer" class="UserControlContainer pealHeader" DefaultButton="btnSearch" runat="server">  
     <li class="full">  
            <asp:TextBox ID="tbSearch" runat="server" TabIndex="1" ></asp:TextBox> 
            <asp:ImageButton ID="btnSearch" runat="server" 
                 Enabled="true" onclick="btnSearch_Click" TabIndex="3" ImageUrl="~/images/icons/lookingglass.png" /> 
     </li> 
     <div> 
       <telerik:RadGrid ID="RadGrid1" runat="server" EnableAJAX="true" EnableAjaxSkinRendering="true">  
     
         . . .  
     
       </telerik:RadGrid> 
     </div> 
     
     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" EnableSkinTransparency="true" BackgroundPosition="Center" runat="server">  
     </telerik:RadAjaxLoadingPanel> 
     
          
    </asp:Panel> 
     
     
     
    ... serverside ......  
     
            protected void LoadData()  
            {  
                PartyDataContext pdc = new PartyDataContext();  
                var prty = pdc.IndividualsGetComplex(tbSearch.Text.ToUpper()).ToList();  
     
                RadGrid1.DataSourceID = "";  
                RadGrid1.DataSource = prty;  
            }  
     
            protected void btnSearch_Click(object sender, ImageClickEventArgs e)  
            {  
                LoadData();  
                RadGrid1.Rebind();              
            } 
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 09 Dec 2009 Link to this post

    Hi Axel,

    Please go through the following help document and see if it helps.
    RadCodeBlock and RadScriptBlock

    Greetings,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Axel
    Axel avatar
    41 posts
    Member since:
    Jul 2009

    Posted 09 Dec 2009 Link to this post

    Hi Pavlina

    thanks for the reply.

    Did you look at the main issue in my issue i.e. upload panel only showing up on initial search (when search btn is pressed right after pageload)?

    On the codeblock issue, I have scrips like these inside my radgrid
    <NoRecordsTemplate> 
    <span class="information center"><%= GetLocalResourceObject("NothingFound").ToString() %></span>  
    </NoRecordsTemplate> 
     

    These along with other like (HeaderText="<%$ Resources:HeaderName %>") may be causing problems. Wrapping the Radgrid with Radcodeblock does not seem to be the solution.

    Axel.
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 11 Dec 2009 Link to this post

    Hi Axel,

    Attached to this message is a simple working application which handles the desired functionaltity. Please examine it and let me know what is the difference in your scenario.

    Sincerely yours,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Axel
    Axel avatar
    41 posts
    Member since:
    Jul 2009

    Posted 14 Dec 2009 Link to this post

    Thanks.

    This code piece and discovering the "RadAjaxManagerProxy" solved my issue. Great Job.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017