当前位置:网站首页>C winfrom DataGridView click on the column header can not automatically sort the problem

C winfrom DataGridView click on the column header can not automatically sort the problem

2022-04-23 21:25:00 Plant a sweet smell

@C# winfrom datagridview Clicking on the column header cannot automatically sort the problem

winfrom datagridview Automatic sorting of column headers

The phenomenon : We're binding DataGridView.DataSource after , Set the sort of the list to Automatic after , Cannot automatically sort

 Insert picture description here

Solution :

Set up DataGridView.DataSource by datatable that will do , If the data source is list, Then you need to turn around datatable.

版权声明
本文为[Plant a sweet smell]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/110/202204200619557165.html