
How to sort dataview table on string datatype column contains all numbers:
All,
How to sort dataview table on string datatype column contains all
numbers:
Ex. dv.dt.Col1 (datatype is string) contains the following values (all
are integer)
Col1
-----
1
2
4
6
8
10
12
18
19
20
dv.sort = "Col1"
Dim dt As New DataTable()
Dim dr As DataRow
Dim dv As New DataView()
dv.table = dt
dv.sort = "Col1"
For Each dv.Table.Rows
Debug.Writeline(col1)
Next
I get the following output:
--------------------------
1
10
12
18
19
2
20
4
6
8
Can anyone tell me, how to get the data in the following order,
---------------------------------------------------------------
1
2
4
6
8
10
12
18
19
Note* I did convert the column to int32 (setting datatype) in the
program but no result.
Thanks,
Sudhakar