如何在GridView中将列设为只读 [英] how to make column readonly in gridview
本文介绍了如何在GridView中将列设为只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使gridview的单列变为只读.我正在运行时显示gridview,即在用户从组合框中选择项目之后...
how to make a single column of griddview readonly.I am showing gridview at runtime i.e after user selct items from combobox...
推荐答案
将您的datagridView的只读"属性设置为True;
在Windows中:
You just need to make your datagridView''s Read only property to True;
In Windows:
dgvSearchResults.Columns["ColumnName"].ReadOnly = true;
在网络中:
In Web:
((BoundField)dgvSearchResults.Columns[columnIndex]).ReadOnly = true;
希望对您有所帮助.
Hope it helps.
请参阅:
> http://stackoverflow.com/questions/3343073/read-only-for-column-网格内视图 [ ^ ]
http://stackoverflow.com/questions/5897985/gridview-template-column-有条件地设置为只读 [ ^ ]
Refer this:
http://stackoverflow.com/questions/3343073/read-only-for-column-in-gridview[^]
http://stackoverflow.com/questions/5897985/gridview-template-column-conditionally-set-to-readonly[^]
请参阅此
http://social.msdn.microsoft.com/Forums/zh/wpf/thread/ecc6db40-0933-40e8-9848-ca8d79c1c332 [
see this
http://social.msdn.microsoft.com/Forums/en/wpf/thread/ecc6db40-0933-40e8-9848-ca8d79c1c332[^]
这篇关于如何在GridView中将列设为只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文