您必须重写 OnTextBoxTextChanged 方法以循环浏览列并过滤列表。
这是有关如何执行此操作的示例:
public partial class MultiColumnSearchCombo : MultiColumnCombo
{
protected override void OnTextBoxTextChanged(EventArgs e)
{
GridEXFilterCondition internalFilter = new GridEXFilterCondition();
String str = TextBox.Text;
foreach (GridEXColumn column in DropDownList.Columns)
{
if (!column.Visible)
continue;
GridEXFilterCondition filterCondition = new GridEXFilterCondition(column, ConditionOperator.Contains, str);
internalFilter.AddCondition(LogicalOperator.Or, filterCondition);
}
DropDownList.ApplyFilter(internalFilter);
}
}