标签:lis close form 图片 string 需要 read color 模糊
先上效果图:
控件调用示例:(devexpress使用了16.2.6.0版本,可以根据实际需要进行版本转换)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace YRCode.Setup.DemoLookUpEdit { public partial class frmDemo : Form { /// <summary> /// 构造函数 /// </summary> public frmDemo() { InitializeComponent(); if (!DesignMode) { //控件调用示例 List<ColumnCaption> visibleColumns = new List<ColumnCaption>() { new ColumnCaption("Id", "编号", 120), new ColumnCaption("Product", "产品", 240), new ColumnCaption("Name", "名称", 180), }; gridLookUpEditEx1.Bind(DemoData(), "Id", "Product", visibleColumns, DealResult); } } /// <summary> /// 委托调用 /// </summary> /// <param name="result"></param> private void DealResult(string result) { textEdit1.EditValue = gridLookUpEditEx1.Text; textEdit2.EditValue = gridLookUpEditEx1.EditValue; } /// <summary> /// 测试数据 /// </summary> /// <returns></returns> private DataTable DemoData() { DataTable dt = new DataTable(); dt.Columns.Add("Id", typeof(System.Int32)); dt.Columns.Add("Product", typeof(System.String)); dt.Columns.Add("Name", typeof(System.String)); for (int i = 0; i < 30; i++) { DataRow dr = dt.NewRow(); dr["Id"] = 100 + i; dr["Product"] = GetChar(i) + i.ToString() + "DLJ"; dr["Name"] = GetName(i) + i.ToString(); dt.Rows.Add(dr); } return dt; } /// <summary> /// 测试数据 /// </summary> /// <param name="number"></param> /// <returns></returns> private static string GetChar(int number) { string[] array = new string[] { "A", "B", "C", "D", "E", "F", "G", "H", "I" }; string result = array[number % 9]; return result; } /// <summary> /// 测试数据 /// </summary> /// <param name="number"></param> /// <returns></returns> private static string GetName(int number) { string[] array = { "Unitch数据采集器","MS扫描枪","105SL","TSC","PH880","MS320便携式打印机","PA700","DSX800电脑","HP打印机" }; string result = array[number % 9]; return result; } } }
如需源码,扫描购买,邮件发送!
仿LookUpEdit多列模糊搜索,功能比GridLookUpEdit强大,比SearhLookUpEdit方便
标签:lis close form 图片 string 需要 read color 模糊
原文地址:https://www.cnblogs.com/yunyun0574/p/11271241.html