LookUpEdit
序言
LookUpEdit
滚动条
GridLookUpEdit
删除

private void InitLookUp() { DataTable dt = new DataTable(); dt.Columns.Add("ProductID", typeof(string)); dt.Columns.Add("ProductName", typeof(string)); for (int i = 0; i < 20; i++) { DataRow dr = dt.NewRow(); dr["ProductID"] = i.ToString(); dr["ProductName"] = $"{i}-描述"; dt.Rows.Add(dr); } // Bind the edit value to the ProductID field of the "Order Details" table; // the edit value matches the value of the ValueMember field. //lookUpEditGroupType.DataBindings.Add("EditValue", dt, "ProductID"); lookUpEditGroupType.Properties.NullText = string.Empty; // Prevent columns from being automatically created when a data source is assigned. lookUpEditGroupType.Properties.View.OptionsBehavior.AutoPopulateColumns = false; // The data source for the dropdown rows lookUpEditGroupType.Properties.DataSource = dt; // 下拉框显示的字段数据. lookUpEditGroupType.Properties.DisplayMember = "ProductName"; // The field matching the edit value. lookUpEditGroupType.Properties.ValueMember = "ProductID"; // Add two columns in the dropdown: // A column to display the values of the ProductID field; GridColumn col1 = lookUpEditGroupType.Properties.View.Columns.AddField("ProductID"); col1.VisibleIndex = 0; col1.Caption = "代码"; // A column to display the values of the ProductName field. GridColumn col2 = lookUpEditGroupType.Properties.View.Columns.AddField("ProductName"); col2.VisibleIndex = 1; col2.Caption = "描述"; // Set column widths according to their contents. lookUpEditGroupType.Properties.View.BestFitColumns(); // Specify the total dropdown width. lookUpEditGroupType.Properties.PopupFormWidth = 300; }
SearchLookUpEdit
资料
分类:
【0086】DevExpress
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
2018-03-07 Redis实战(8)管道
2018-03-07 spring boot(二):注解大全
2017-03-07 Java MyBatis3(2) Mapper代理的开发方式
2016-03-07 [转载]玩转Asp.net MVC 的八个扩展点
2016-03-07 SQLServer处理亿万级别的数据的优化措施