* UIComboDataGridView: 增加ClearFilter,可以清除弹窗的搜索栏文字

This commit is contained in:
Sunny 2023-09-25 12:14:52 +08:00
parent 637504e04b
commit 069ed8c606
2 changed files with 11 additions and 0 deletions

View File

@ -415,6 +415,11 @@ namespace Sunny.UI
ComboDataGridViewFilterChanged?.Invoke(this, new UIComboDataGridViewArgs(filterText, dataGridView.RowCount));
}
public void ClearFilter()
{
btnClear_Click(null, null);
}
private void btnClear_Click(object sender, EventArgs e)
{
edtFilter.Text = "";

View File

@ -28,6 +28,7 @@
* 2022-11-18: V3.2.9
* 2022-11-30: V3.3.0 Clear方法
* 2023-07-25: V3.4.1 DataGridView
* 2023-09-25: V3.5.0 ClearFilter
******************************************************************************/
using System;
@ -114,6 +115,11 @@ namespace Sunny.UI
DataGridView.DataSource = null;
}
public void ClearFilter()
{
item.ClearFilter();
}
private void Item_ComboDataGridViewFilterChanged(object sender, UIComboDataGridViewArgs e)
{
FilterChanged?.Invoke(this, e);