功能: 在RepositoryItemTextEdit内置编辑器编辑时,自动过滤匹配数据;
=>设计图
=>效果图
=>代码_FormView
using System;
using System.Collections.Generic;
using System.Data;
using System.Windows.Forms;
using HelloWorld.classEntity;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Repository;
using System.Collections;
using DevExpress.XtraGrid.Views.Grid;
using System.Drawing;
using DevExpress.XtraGrid.Columns;
namespace HelloWorld
{
public partial class FormView : Form
{
// 数据表格
private readonly DataTable fvdt;
// 数据列表
private readonly List<string> listData;
// 过滤基数_修改后值
private string editStr;
// 容器位置
private Point location;
// 视图大小
private readonly int viewWidth;
private readonly int viewHeight;
public FormView()
{
InitializeComponent();
/// 初始数据_表格
fvdt = getDataTable(16);
/// 初始数据_列表_指定智能提示列
listData = getDataList(fvdt, "name");
// 弹出容器_设置
int wvalue = getColumnWidth(fvgridview, "姓名");
fv_pccLbCtrl.Width = wvalue;
fvpopupcctrl.Width = wvalue + 6;
fv_pccLbCtrl.Height = 150;
fvpopupcctrl.Height = 156;
// 容器位置_(默认)记得手动调节位置(添加增量);
location = new Point(getColumnX(fvgridview, "姓名") + 20, 56);
// 视图大小_设置
viewWidth = fvgridctrl.Width;
viewHeight = fvgridctrl.Height;
}
private void FormView_Load(object sender, EventArgs e)
{
// GridCtrl_绑定数据源
fvgridctrl.DataSource = fvdt;
fvcolDel.Caption = " "; // 操作行;
// 视图单击_获取鼠标坐标
fvgridview.MouseDown += fvgri