只读Gridview控件 [英] Read only Gridview control
本文介绍了只读Gridview控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我点击一个按钮时,名为grdMaterial的ridview将加载数据。 Gridview在位置0有一个复选框。我希望gridview加载而不显示Checkbox
或复选框将被禁用
如何在asp中进行只读的gridview控件。 net c#。请帮帮我
When I click a button then a ridview named "grdMaterial" will load with data. Gridview has a checkbox in position 0. I want the gridview will load without showing Checkbox
Or the checkbox will be disabled
How can I make a gridview control readonly in asp.net c#. Please help me
推荐答案
据我所知,你无法将整个gridview视为ReadOnly,所以你可以做的是,
As far as I know you can't make entire gridview as ReadOnly, So instead what you can do is,
// Form App GridView
dataGridView1.Columns["ColumnName"].ReadOnly = true;
//Web App GridView
((BoundField)gridView1.Columns[columnIndex]).ReadOnly = true;
-KR
-KR
这篇关于只读Gridview控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文