DataGridView排序 [英] DataGridView Sorting

查看:69
本文介绍了DataGridView排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含两列的DataGridView我要禁用对第一列中的单元格进行排序我已将第一列中的属性sortedMode分配给不可排序但问题是当用户单击另一列时
所拥有的单元格也是第一个也被排序的单元格我想阻止它。





 

解决方案

您好ToabaOmar,


您确认要这样做吗?


DataGridView中同一行中的每一列数据通常都是关联的。排序列时,其他列


会相应更改。如果只对其中一列进行排序,则整个DataGridView中的数据将处于混乱状态。


问候,


Kyle


I have a DataGridView that contains Two Columns I want to disable Sorting the cells in the first Column I already assigned the property sortedMode in the first Column to Not Sortable but the problem is when the user click on the other column the cells that are owned by the first also sorted i want to prevent that.


 

解决方案

Hi ToabaOmar,

Do you confirm you want to do this?

Each column of data in the same row in the DataGridView is usually associated. When you sort a column, the other columns will

change accordingly. If only one of the columns is sorted, the data in the entire DataGridView will be in chaos.

Regards,

Kyle


这篇关于DataGridView排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆