首页 > 其他 > 详细

关于下拉列表数据过多导致IE10缓存溢出的解决方案

时间:2014-03-28 09:03:31      阅读:403      评论:0      收藏:0      [点我收藏+]

方案一:利用控件本身所携带的触发事件实时加载指定条数的选项

bubuko.com,布布扣
<telerik:RadComboBox ID="radcbbx_SystemName" runat="server" 
                                                    Width="99%"  Height="200px" HighlightTemplatedItems="true" 
                                                EnableLoadOnDemand="true" Filter="None" 
                                                AllowCustomText="True" CollapseDelay="1000" ExpandDelay="1000" 
                                                onitemsrequested="radcbbx_SystemName_ItemsRequested" >
                                                <HeaderTemplate>
                                                    <table style="width: 100%" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <td style="width: 100%;">
                                                                系统名称
                                                            </td>
                                                            
                                                        </tr>
                                                    </table>
                                                </HeaderTemplate>
                                                <ItemTemplate >
                                                    <table style="width: 100%; height:20px;" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <td style="width: 100%;">
                                                                <%# DataBinder.Eval(Container, "Attributes[‘System_BaseName‘]")%>
                                                            </td>
                                                            
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </telerik:RadComboBox>
bubuko.com,布布扣

 

后台CS文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
protected void radcbbx_SystemName_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
        {
            if (e.Text != "")
            {
                DataTable dt = new DataTable();
                try
                {
                    string strWhere = " and System_BaseName like ‘%" + e.Text.Trim() + "%‘ ";
                    dt = sysbaseInfo.GetSystemBaseInfoIDandName(strWhere);
 
                    foreach (DataRow dataRow in dt.Rows)
                    {
                        RadComboBoxItem item = new RadComboBoxItem();
                        string strName = dataRow["System_BaseName"].ToString();
                        string strId = dataRow["System_BaseID"].ToString();
 
                        item.Text = strName.Trim();
                        item.Value = strId;
                        item.Attributes.Add("System_BaseName", strName.Trim());
                        radcbbx_SystemName.Items.Add(item);
                        item.DataBind();
                    }
 
 
                }
                catch (Exception Ex)
                {
                    SysLog sl = new SysLog();
                    sl.WriteErrorLog("0", "获取立项申请页面关联系统列表失败!", Ex);
                }
                finally
                {
                    dt.Dispose();
                }
 
            }
 
        }

  

关于下拉列表数据过多导致IE10缓存溢出的解决方案,布布扣,bubuko.com

关于下拉列表数据过多导致IE10缓存溢出的解决方案

原文:http://www.cnblogs.com/jeforser/p/3628810.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!