我已经在这里呆了几个小时了。我有一个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" />
答案 0 :(得分:7)
这是一个老问题,但我会尝试回答,因为我遇到了同样的问题,这是我的解决方案:
ListView
不会呈现为HTML标记(我假设ListViewPanel1
和lvFullControlAlbums
是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