I use a simple DataGridView to store a bunch of data (Funny that).
I have decimal numbers in a specific column. But when it comes to ordering this decimal column, he orders it incorrectly. For example:
The start order can be:
- 0.56
- 3.45
- 500.89
- 20078.90
- 1,56
- 100.29
- 2,39
The final order will be:
- 0.56
- 100.29
- 1,56
- 20078.90
- 2,39
- 3.45
- 500.89
As you can see, he orders it starting from the first number. And then orders it that way.
I thought, maybe I could set the column to another "ColumnType", and that could automatically do that. But there are no column types Numeric or Decimal.
I was on MSDN considering the problem, and I could find a sorting method that I can use in the DataGridView. But the explanation was a little over my head, and the examples did not use numbers, only text, so I could not see how I had to switch things.
Any help would be greatly appreciated.
c # winforms datagridview
Mindingdata
source share