Rad Ajax加载面板没有出现在asp.net页面的回发中

时间:2011-10-18 20:59:54

标签: asp.net ajax telerik

我已经在这里呆了几个小时了。我有一个Aspx页面,有几个用户控件。每当我在用户控件上调用任何javascipt时listview更新但不显示对话框。任何人都可以告诉我为什么或任何信息。这是我的代码。 aspx页面
         

用户控制javascript

 var album = $(this).prev().val();
                    $('[id$=AccessChoice]').val(option);
                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(album);

用户控制

<telerik:RadAjaxManagerProxy  ID="FullAlbumAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="FullAlbumAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="ListViewPanel1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="lvFullControlAlbums">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdoSortDate">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdoSortName">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy >
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0" />

2 个答案:

答案 0 :(得分:7)

这是一个老问题,但我会尝试回答,因为我遇到了同样的问题,这是我的解决方案:

ListView不会呈现为HTML标记(我假设ListViewPanel1lvFullControlAlbums是ListViews),因此您应将这些控件包装在Panel中并修改AjaxSettings相应地:

<telerik:AjaxSetting AjaxControlID="FullAlbumAjaxManager1">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="ListViewWrapper" LoadingPanelID="RadAjaxLoadingPanel1" />
    </UpdatedControls>
</telerik:AjaxSetting>

<asp:Panel ID="ListViewWrapper" runat="server">
    <asp:ListView ID="ListViewPanel1" runat="server" >
        <!-- your code here -->
    </asp:ListView>
</asp:Panel>

可能FullAlbumCounter也是一个控件,它本身不会仅作为HTML标记呈现其内容。在这种情况下,你应该这样做。

请参阅:
http://www.telerik.com/community/forums/aspnet-ajax/listview/loading-panel-not-showing-up.aspx

希望它有所帮助。

答案 1 :(得分:0)

在其中一个ajax设置中应该有AjaxManager1而不是FullAlbumAjaxManager1