我正在使用带有RadAjaxManager和RadComboBox的页面。
<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的帮助感谢!
发布于 2013-11-19 18:02:03
对于如何将项绑定到对象有多种选择,但我倾向于对大型数据集使用的方法是“按需加载”。Telerik RadComboBox有一个名为EnableLoadOnDemand的属性,当设置为true时,它将获得下一组数据。查看网络分析器,您将看到向服务器发出了一些小请求,以获取填充下拉列表所需的数据。
示例:
<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)
https://stackoverflow.com/questions/20050517
复制相似问题