Dataset defaultview row filter
Posted
by acadia
on Stack Overflow
See other posts from Stack Overflow
or by acadia
Published on 2010-03-18T23:18:10Z
Indexed on
2010/03/18
23:21 UTC
Read the original article
Hit count: 758
ADO.NET
Hello, I have a dataset named ordersDS with several records I am getting from another function.
I have row filters set as below. What I want to know is What does the RowFilters RegionID and OrganizationID do. will it look for records which have either region_id or organization ID.
Dim OrderList as new Datatable
OrdersDs.Tables(0).DefaultView.RowFilter="Region_ID = " & regionID
OrdersDs.Tables(0).DefaultView.RowFilter="Organization_ID = " & OrgID
OrderList = OrdersDs.Tables(0).DefaultView.ToTable()
if not OrderList is nothing then
tempOList = New List(Of Orders)
For Each dr As DataRow In OrderList .Rows
Try
tempOList .Add(New Orders With _
{
.Occurence = 1, _
.Severity = 1})
Catch ex As Exception
End Try
Next
end if
© Stack Overflow or respective owner