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

RadAjaxManager: problem on second call back

1 Answer 89 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Sathish
Top achievements
Rank 1
Sathish asked on 14 Jan 2010, 09:19 PM
Hi,

I am trying to implement radajax manager. Here is the structure of my program

Global_masterpage
Module_masterpage
Content page

the rad script manager is in global masterpage and module masterpage has one scriptmanagerproxy for a composite script and the module masterpage has the radajaxloading panel to show ajax progress.

now in the content page, i got the code below. (extracted from a big page for testing and locating the problem). i'm trying to show the advanced search panel (pnlSearchCriteria) when you click on the lnkShowAdvancedSearch and Hide it from lnkHideAdvancedSearch (which is inside pnlSearchCriteria) The first time, the control behaves as expected. the next time i click on lnkshowadvancedsearch button, the pnlsearchcriteria does not show up and the progress area (radajaxloadingpanel) shiows activity and goes on forever. in the project configuration wizard i have all of them enabled.


here is the aspx code and followed by the vb code

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.master" 
    CodeBehind="WebForm2.aspx.vb" Inherits="ERP.OM.WebForm2" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server"
    <span style="padding-right: 10px">|</span> 
    <asp:LinkButton ID="lnkShowAdvancedSearch" runat="server" CausesValidation="false" 
        Text="Advanced Search" /> 
    <asp:Panel runat="server" ID="pnlSearchCriteria" Visible="false" CssClass="SearchSOAdvancedSearchPanel"
        <table id="tblAdvancedSearch" runat="server" width="100%"
            <tr> 
                <td style="border-right: solid 1px #EEEEEE; border-bottom: solid 1px #EEEEEE"
                    <span>Sales Person</span> 
                    <br /> 
                    <erp:Employees ID="ddlSearchSalesPerson" runat="server" AutoPostBack="true" /> 
                </td> 
                <td style="border-right: solid 1px #EEEEEE; border-bottom: solid 1px #EEEEEE"
                    <span>Status</span> 
                    <br /> 
                    <erp:SalesOrderStatuses runat="server" ID="ddlSearchSalesOrderStatus" AutoPostBack="true" /> 
                </td> 
                <td style="border-right: solid 1px #EEEEEE; border-bottom: solid 1px #EEEEEE"
                    <span>Order Type </span> 
                    <br /> 
                    <erp:SalesOrderTypes runat="server" ID="txtSearchSalesOrderTypes" AutoPostBack="true" /> 
                </td> 
                <td style="border-right: solid 1px #EEEEEE; border-bottom: solid 1px #EEEEEE"
                    <span>Created By</span> 
                    <br /> 
                    <erp:Employees ID="ddlSearchCreatedBy" runat="server" AutoPostBack="true" /> 
                </td> 
                <td width="100px" align="center" valign="bottom"
                    <asp:LinkButton ID="lnkGoAdvancedSearch" runat="server" Text="(search)" /> 
                    <asp:LinkButton ID="lnkHideAdvancedSearch0" runat="server" CausesValidation="false" 
                        Text="(close)" /> 
                </td> 
            </tr> 
        </table> 
    </asp:Panel> 
    <telerik:RadGrid runat="server" ID="gvResults" AllowPaging="True" AllowSorting="True" 
        AutoGenerateColumns="False" GridLines="None"
        <MasterTableView runat="server" PageSize="50" AllowMultiColumnSorting="true"
            <Columns> 
                <telerik:GridTemplateColumn HeaderText="Order No." SortExpression="SalesOrderNo"
                    <ItemStyle Width="60px"></ItemStyle> 
                    <ItemTemplate> 
                        <asp:HyperLink ID="hlkSalesOrderID" runat="server" CausesValidation="false" NavigateUrl='<%# "~/SearchSalesOrders.aspx?SalesOrderID=" & Eval("SalesOrderID") %>' 
                            Text='<%# Eval("SalesOrderNo") %>' /> 
                    </ItemTemplate> 
                    <ItemStyle Width="60px" HorizontalAlign="Center" /> 
                </telerik:GridTemplateColumn> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 
    <telerik:RadAjaxManager ID="ramSearchSO" runat="server" UpdatePanelsRenderMode="Inline"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="lnkShowAdvancedSearch"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="pnlSearchCriteria" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="pnlSearchCriteria"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="gvResults" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="lnkGoAdvancedSearch"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="gvResults" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="lnkHideAdvancedSearch"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lnkShowAdvancedSearch" /> 
                    <telerik:AjaxUpdatedControl ControlID="pnlSearchCriteria" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
</asp:Content> 
 


 
    Private Sub lnkShowAdvancedSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkShowAdvancedSearch.Click 
        pnlSearchCriteria.Visible = True 
        lnkShowAdvancedSearch.Enabled = False         
    End Sub 
 
    Protected Sub lnkHideAdvancedSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkHideAdvancedSearch0.Click 
        lnkShowAdvancedSearch.Enabled = True 
        pnlSearchCriteria.Visible = False 
    End Sub 

please help. thanks

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 20 Jan 2010, 07:56 AM
Hi Sathish,

RadAjaxManager should go into the Global_masterpage. For the content page, you need to use RadAjaxManagerProxy. For more info:

AJAX Manager Proxy

Kind regards,
Veli
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.
Tags
Ajax
Asked by
Sathish
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or