Sorting Datagrid in C #

Do I have 5 columns in my datagrid? I want to sort a datagrid in ascending and descending order based on a specific column.

My question is: how do I sort for only one column?

As the data in this column has a string data type, is it possible to sort numerical data? any help is appreciated. thank

Also, when I sort, it doesn't sort according to the numerical value in the column.

These are winforms .. btw, I got the solution .. I passed the values ​​as strings, which he did not sort numerically .. now it does .. thanks guyzz

+3
source share
1 answer

DataTable DataGridview, . .

+1

Source: https://habr.com/ru/post/1727776/


All Articles