1
我只有在我的數據集四個值:過濾掉數據集來消除一個值
Value1
Value2
Value3
Value4
我要篩選我的數據集,使其不僅具有值1,值2和值3。我不想在我的數據集中使用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。
任何幫助將不勝感激。
什麼是order.AsEnumerable()。它給我一個錯誤,說Orders沒有聲明 – Anjali5