首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用RadCombobox的RadAjaxManager,性能非常慢

使用RadCombobox的RadAjaxManager,性能非常慢
EN

Stack Overflow用户
提问于 2013-11-18 22:43:43
回答 1查看 1.5K关注 0票数 0

我正在使用带有RadAjaxManager和RadComboBox的页面。

代码语言:javascript
复制
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnablePageHeadUpdate="False">
     <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="_Partners" >
             <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="_SubPartners" />
                 <telerik:AjaxUpdatedControl ControlID="_Clients" />
                 <telerik:AjaxUpdatedControl ControlID="_Positions" />
                 <telerik:AjaxUpdatedControl ControlID="_Candidates" />
             </UpdatedControls>
         </telerik:AjaxSetting>

         <telerik:AjaxSetting AjaxControlID="_Candidates">
             <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="rpCandidateApplications" />
             </UpdatedControls>
         </telerik:AjaxSetting>

         <telerik:AjaxSetting AjaxControlID="_SubPartners">
             <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="_Clients" />
                 <telerik:AjaxUpdatedControl ControlID="_Candidates" />
                 <telerik:AjaxUpdatedControl ControlID="_Positions" />
             </UpdatedControls>
         </telerik:AjaxSetting>

我有很大的数据绑定,但它加载数据非常慢,我的客户正在编译关于performance.Any的帮助感谢!

EN

回答 1

Stack Overflow用户

发布于 2013-11-19 18:02:03

对于如何将项绑定到对象有多种选择,但我倾向于对大型数据集使用的方法是“按需加载”。Telerik RadComboBox有一个名为EnableLoadOnDemand的属性,当设置为true时,它将获得下一组数据。查看网络分析器,您将看到向服务器发出了一些小请求,以获取填充下拉列表所需的数据。

示例:

代码语言:javascript
复制
<asp:SqlDataSource ID="sqlOptions" runat="server" ConnectionString='<%$ ConnectionStrings:WebsiteData %>'
    SelectCommand="uspGetOptions" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
<telerik:RadComboBox ID="ddlOptions" runat="server"  Width="100%" AppendDataBoundItems="false"
    MaxHeight="100px" DataTextField="DisplayText" DataValueField="UniqueId" DataSourceID="sqlOptions"
    EnableAutomaticLoadOnDemand="true" EnableLoadOnDemand="true" AllowCustomText="false" Filter="None"
    ShowWhileLoading="true"  ItemsPerRequest="20" EnableVirtualScrolling="true" 
    LoadingMessage="Loading..." EmptyMessage=""  >
</telerik:RadComboBox>

这种方法有一个明显的缺点,那就是你不能快速设置SelectedValue并查看选定的文本,但是telerik已经提出了一个解决方案,他们已经发布了示例代码。(请参阅:Setting an initial value in RadComboBox while using Load on Demand)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20050517

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档