禁用datagridview列 [英] Disable datagridview coloumn
本文介绍了禁用datagridview列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,专家,
我想禁用特定的列,以使用户无法移至该列.此列仅用于显示基于其他列的结果.
请帮帮我.
谢谢,
Anil Kumar
Hi Experts,
I want to disable a specific column so that user can''t move to there. This column has to be used only for displaying result based on another columns.
Please help me.
Thanks,
Anil Kumar
推荐答案
您可以像这样设置列的只读属性":
Hi,
you can set the ''readonly-property'' of the column like this:
dataGridView1.Columns["YourColumnName"].ReadOnly = true;
这篇关于禁用datagridview列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文