I have a Data view that filters data from a datatable and i want to sort the results
so that the records return in the same order as their primary key occurs in the row filter.
This may better be illustrated by example:
Code:
Dim DV As New DataView(mytable)
DV.RowFilter = "primarykey IN ('8','1','7','3')"
without any sort being applied the records would obviously be returned as follows:
1
3
7
8
As their existence within the datatable would be numeric
My question is how do i set the DV.Sort property to return the records as follows:
8
7
7
3
i.e. the order of priority as they exist in the filter
Is this possible or is there a recommended work around?
Thanks in advance.
Ken