排序DataGridView [英] Sorting DataGridView
本文介绍了排序DataGridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已将DataGridView的列设置为
SortMode = DataGridViewColumnSortMode.Automatic;
但是点击单元格标题,它不排序
I have set the Columns of the DataGridView to SortMode = DataGridViewColumnSortMode.Automatic; But on the click on the cell header, it does not sort it
Deos有人知道如何做?
Deos anyone know how to do it ?
推荐答案
有一种方法在datagridview中排序
There is a method Sort in datagridview
dataGridView1.Sort(dataGridView1.Columns["yourcol"],ListSortDirection.Ascending);
这篇关于排序DataGridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文