如何在Windows应用程序中使用csharp禁用DataGridView中的列标题排序 [英] How to disable the column header sorting in DataGridView using csharp in windows application

查看:82
本文介绍了如何在Windows应用程序中使用csharp禁用DataGridView中的列标题排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意它是windows应用程序。



如何使用csharp禁用DataGridView中的列标题排序。

我写的是哪个事件代码。

我该怎么办?什么是密码?



请帮帮我。

问候,

Narasiman P.

Note it is windows application.

How to disable the column header sorting in DataGridView using csharp.
In which event i write the code.
how can i do? what is the code?

Please help me.
Regards,
Narasiman P.

推荐答案

请参阅 -

http://stackoverflow.com/questions/3965304/disable-datagridview-colum-header-to-allow-sorting [ ^ ]
Refer this-
http://stackoverflow.com/questions/3965304/disable-datagridview-colum-header-to-allow-sorting[^]


private void dataGridView1_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
       {
           base.OnClick(e);
           e.Column.SortMode = DataGridViewColumnSortMode.NotSortable;
       }


这篇关于如何在Windows应用程序中使用csharp禁用DataGridView中的列标题排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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