* UIComboDataGridView: 增加过滤框输入逐一过滤属性Filter1by1

This commit is contained in:
Sunny 2022-11-18 10:46:58 +08:00
parent 0a6ef3e4b4
commit 8c7737db4c
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Windows.Forms;
@ -26,10 +27,14 @@ namespace Sunny.UI
edtFilter.TextChanged += EdtFilter_TextChanged;
}
[DefaultValue(true), Description("过滤框输入逐一过滤"), Category("SunnyUI")]
public bool Filter1by1 { get; set; } = true;
public bool TrimFilter { get; set; }
private void EdtFilter_TextChanged(object sender, System.EventArgs e)
{
if (!Filter1by1) return;
btnSearch_Click(null, null);
}

View File

@ -24,6 +24,7 @@
* 2022-06-19: V3.2.0 FilterChanged
* 2022-09-08: V3.2.3
* 2022-11-03: V3.2.6
* 2022-11-18: V3.2.9 Filter1by1
******************************************************************************/
using System;
@ -52,6 +53,9 @@ namespace Sunny.UI
this.PerformLayout();
}
[DefaultValue(true), Description("过滤框输入逐一过滤"), Category("SunnyUI")]
public bool Filter1by1 { get; set; } = true;
[DefaultValue(false)]
[Description("过滤时删除字符串前面、后面的空格"), Category("SunnyUI")]
public bool TrimFilter { get; set; }
@ -75,6 +79,7 @@ namespace Sunny.UI
item.ShowButtons = true;
item.SetDPIScale();
item.Translate();
item.Filter1by1 = Filter1by1;
//ItemForm.Show(this);
ItemForm.Show(this, new Size(DropDownWidth < Width ? Width : DropDownWidth, DropDownHeight));
item.ComboDataGridViewFilterChanged += Item_ComboDataGridViewFilterChanged;