Windows窗体中的DataGridView排序 [英] DataGridView Sorting in windows forms
本文介绍了Windows窗体中的DataGridView排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
datagridview有5列.当我单击任何一列时,它应该以升序对所有数据进行排序,如果我单击同一列,则应以降序进行排序.请就同一
Hi,
datagridview is having 5 columns. When i click on any column it should sort all the data in ascending and if I click the same column should sort in descending order. Please help me regarding the same
推荐答案
^ ]
嗨pradeep455,
您只需将AllowUserToOrderColumns
属性设置为true.
希望对您有所帮助,
:)
Hi pradeep455,
You have just to setAllowUserToOrderColumns
property to true.
I hope this help,
:)
这篇关于Windows窗体中的DataGridView排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文