Winform DatagridView Numeric Column Sorting

前端 未结 6 1881
有刺的猬
有刺的猬 2021-02-06 05:26

I am using just a simple DataGridView to hold a bunch of data (Funny that).

I have decimals in a particular column. But when it comes to ordering by that decimal column

6条回答
  •  滥情空心
    2021-02-06 06:07

    Your database column type should be int or double or float, not varchar or something.... So you have to change your value-type in the database... You no need to write any code or something it directly sort when you click on the column Header...

提交回复
热议问题