源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

ASP .NET 可编辑输入自动匹配的下拉框

  • 时间:2020-06-06 22:29 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:ASP .NET 可编辑输入自动匹配的下拉框
[b]一. 引用dll文件[/b] [img]http://files.jb51.net/file_images/article/201703/201703241408101.png[/img] [b]二. aspx前台页面应用该控件[/b]
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    小区:      
 <telerik:RadComboBox RenderMode="Lightweight" ID="DropDownList1" AllowCustomText="true" AutoPostBack="True" runat="server" Width="110px" Height="400px"
  EmptyMessage="请输入小区名称" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" OnItemsRequested="DropDownList1_ItemsRequested" MarkFirstMatch="true" EnableLoadOnDemand="true"
   HighlightTemplatedItems="true" DropDownCssClass="exampleRadComboBox">
    </telerik:RadComboBox>
[b]三. aspx.cs文件给下拉框绑定下拉选项数据[/b]   
this.DropDownList1.DataSource = (new BLL_TArea()).GetAllAreaInfo();
   this.DropDownList1.DataTextField = "AREANAME";
   this.DropDownList1.DataValueField = "AREAGUID";
   this.DropDownList1.DataBind();
   DropDownList1.Items.FindItemByValue(BaseClass.Utility.Cookie.GetCookie("AreaGuid")).Selected = true;
[b]三. 检索效果[/b]   检索前: [img]http://files.jb51.net/file_images/article/201703/201703241408102.png[/img]   检索后: [img]http://files.jb51.net/file_images/article/201703/201703241408103.png[/img] 以上所述是小编给大家介绍的ASP .NET 可编辑输入自动匹配的下拉框,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对编程素材网网站的支持!
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部