Retrieve row order from DataGrid 1.0
-
21-08-2019 - |
Question
I am working a legacy app which is .net 1.1 and I need to retrieve the rows in a datagrid post sort (by clicking on column header). This sounded like an easy task however, the answer seems to elude me. I can retrieve the rows from the dataset just fine but, they are not sorted again when the header is clicked.
Solution
I found the answer was to create a DataView such as
Dim dv As DataView = CType(dg.DataSource, DataTable).DefaultView
Hope this might help someone else later on...
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow