0
Answer

DataGridView - sort by numbers

Ask a question
Oystein

Oystein

18y
2.2k
1
Hi all,
I'm developing a system in c# and have added som values to my datagridview. In the first column i have numbers. When i try to sort the datagridview by this numbers it seems like they are ordered by string.
Eksample:

Column 1:
2
10

After order:
10
2

I have tried to set the ValuType without any luck.

Can anyone help me with this problem?

Regards