B
bgsd
I need to be able to sort/search a datatable for 2
columns, both of type integer. Is this possible?
Dim dv As New DataView(MyDataTable,...)
Dim dr As DataRowView
Dim iIndex As Integer
Dim objSearch(1) As Object
dv.Sort = ("Column1, Column2 ASC")
objSearch(0) = 5 'Locate 5 in column 1
objSearch(1) = 6 'Locate 6 in column 2
iIndex = dv.Find(objSearch)
Will this find rows in my view where Column1 = 5 AND
Column2 = 6? Or will it find rows where Column1 = 5 or
6 AND rows where Column2 = 5 or 6?
As an alternative, I could apply a filter upon the
DataView when enstantiating it. However, wouldn't this
be less efficient/concise than DataView.Find?
-bgsd
columns, both of type integer. Is this possible?
Dim dv As New DataView(MyDataTable,...)
Dim dr As DataRowView
Dim iIndex As Integer
Dim objSearch(1) As Object
dv.Sort = ("Column1, Column2 ASC")
objSearch(0) = 5 'Locate 5 in column 1
objSearch(1) = 6 'Locate 6 in column 2
iIndex = dv.Find(objSearch)
Will this find rows in my view where Column1 = 5 AND
Column2 = 6? Or will it find rows where Column1 = 5 or
6 AND rows where Column2 = 5 or 6?
As an alternative, I could apply a filter upon the
DataView when enstantiating it. However, wouldn't this
be less efficient/concise than DataView.Find?
-bgsd