下面的示例展示了如何使用 ViewFilter.NonColumnFilter 属性把筛选指派到视图。

C#CopyCode image复制代码
gridView1.ActiveFilter.Clear();
gridView1.ActiveFilter.NonColumnFilter = "UnitPrice > 10 AND Discount > 0.05";

Visual BasicCopyCode image复制代码
GridView1.ActiveFilter.Clear()
GridView1.ActiveFilter.NonColumnFilter = "UnitPrice > 10 AND Discount > 0.05"