I have DataTable filled with data from my database. What I need is sort:
Here is example dataTable:
ID_Column
1
2
3
4
5
And here is my List<>:
2
3
5
I need to sort DataTable by data that occur in my List. After sorting DataTable should be like this:
ID_Column
2
3
5
1
4
Is this possible to achieve this type of sorting in DataTable? I don't need to have same order like items in my List. Just need to have all items from list on top of DataTable.
Last time someone marked this as duplicate and I received answer "how to sort List", but I asked to sort DataTable. DataTable is not List. I'm not able to use OrderBy() method on DataTable.