【发布时间】:2016-11-22 19:26:22
【问题描述】:
我的数据集中只有四个值:
Value1
Value2
Value3
Value4
我想过滤我的数据集,使其只有 Value1、value2 和 Value3。我不想在我的数据集中使用 value4,然后我想将我的下拉列表与这个数据集绑定。这是我目前所拥有的:
Dim ds As New DataSet
ds = SelectionProdCriteria.GetCostType()
ds.Tables(0).DefaultView.RowFilter = "CostType=Value4"
ddlCostType.DataSource = ds
ddlCostType.DataValueField = "CostType"
ddlCostType.DataTextField = "CostType"
ddlCostType.DataBind()
我在ds.Tables(0).DefaultView.RowFilter = "CostType=Value4" 收到一个错误,说支持运算符后缺少操作数。
我只想在我的下拉列表中查看 value1、value2 和 Value3 并过滤掉 value4。
任何帮助将不胜感激。
【问题讨论】: