ASP .NET 可编辑输入自动匹配的下拉框
时间:2021-03-24 10:31:06|栏目:.NET代码|点击: 次
一. 引用dll文件

二. aspx前台页面应用该控件
<%@ 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>
三. aspx.cs文件给下拉框绑定下拉选项数据
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;
三. 检索效果
检索前:

检索后:

上一篇:ASP.NET使用GridView导出Excel实现方法
栏 目:.NET代码
下一篇:JWT + ASP.NET MVC时间戳防止重放攻击详解
本文地址:http://www.codeinn.net/misctech/87358.html






