Hola peoples and peoplettes,
So, I've been reading up on this way to store a sorted dataview in a new datatable, the steps taken below seem to work right (in the datagrid), yet when I start stepping through the sorted datatable the Accts aren't in order. Can someone tell me what gives? Thx
Here's the scene:
That while loop produces a list that is totally not sorted, here's a sample:
MCOLD_1
MCOLD_1
MCOLD_3
MCOLD_2
MCOLD_2
MCOLD_3
MCOLD_3
MCOLD_2
MCOLD_3
MCOLD_3
MCOLD_2
MCOLD_2
I also read about a dataview.ToTable Method but could find one on the instance created, if anyone knows anything about that please give me the 411. Thanks Again for any and all help,
M .Cold
So, I've been reading up on this way to store a sorted dataview in a new datatable, the steps taken below seem to work right (in the datagrid), yet when I start stepping through the sorted datatable the Accts aren't in order. Can someone tell me what gives? Thx
Here's the scene:
VB.NET:
Dim dvSortedAcctNums As DataView = dtUnsortedMess.DefaultView
dvSortedAcctNums.Sort = "Acct_Num" ' Sort By Account Num
' Set sorted view to a new datatable
Dim dtSortedAccts As DataTable = dvSortedAcctNums.Table
dtSortedAccts.TableName = "SortedRecs"
' The output here is sorted properly
gridOUT1.DataSource = dtSortedAccts
'//--> Processing "Supposed" Sorted Recs
...
While CurrentRec < RowCountless1
rtbOUT1.Text &= _
dtSortedAccts.Rows(CurrentRec).Item("Acct_Num") & vbCrLf
CurrentRec += 1
End While
That while loop produces a list that is totally not sorted, here's a sample:
MCOLD_1
MCOLD_1
MCOLD_3
MCOLD_2
MCOLD_2
MCOLD_3
MCOLD_3
MCOLD_2
MCOLD_3
MCOLD_3
MCOLD_2
MCOLD_2
I also read about a dataview.ToTable Method but could find one on the instance created, if anyone knows anything about that please give me the 411. Thanks Again for any and all help,
M .Cold
Last edited: