处于禁用状态的数据网格行 [英] datagrid rows in disabled state
问题描述
我希望在调用edit事件时datagrid行处于禁用状态.由于当时我也需要滚动条,因此我无法禁用datagrid.所以请帮助我
I want datagrid rows in disabled state when edit event is called.I cant disable the datagrid at that time as i need scrollbar also..So please help me
推荐答案
亲爱的朋友,
您不能禁用datagridview行.您唯一可以做的就是将其设置为只读.
Dear Friend,
You can not disable a datagridview row. The only thing you can do is make it readonly.
Private Sub Button8_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Button8.Click
For Each band As DataGridViewBand In dataGridView.Columns
band.ReadOnly = True
Next
End Sub
在编辑模式下,添加以下行:-
In edit mode add this line:-
DataGridView1.ReadOnly = True
http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridviewrow.readonly.aspx [ ^ ]
试试这个:-
http://vb.net-informations.com/datagridview/vb.net_datagridview_database.htm [ ^ ]
请尝试以下链接:-在Datagrid中将任何列设置为只读 [^ ]
http://forums.silverlight.net/t/235161.aspx/1 [ ^ ]
http://www.devx.com/dotnet/Article/33748/0/page/3 [^ ]
希望对您有所帮助.
http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridviewrow.readonly.aspx[^]
try this:-
http://vb.net-informations.com/datagridview/vb.net_datagridview_database.htm[^]
Please try these link:- To make any column readonly in Datagrid[^]
http://forums.silverlight.net/t/235161.aspx/1[^]
http://www.devx.com/dotnet/Article/33748/0/page/3[^]
I hope this will help you out.
您好
试试这个..
Hi
try this..
Gridview1.Columns(x).ReadOnly=True
对您有多少列执行相同的操作...
do the same for how many columns you have...
这篇关于处于禁用状态的数据网格行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!