如何在VB.net中的DataGridView中启用行 [英] How to enable row in DataGridView in VB.net
本文介绍了如何在VB.net中的DataGridView中启用行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好所有访客
如何在vb.net的datagridview中启用行?
谢谢
TONY
Hi all visitors
How can i enable row in datagridview in vb.net?
Thanks
TONY
推荐答案
在datagridview中启用行的四个条件
1.基础数据源支持编辑.
2.启用了DataGridView控件.
3. EditMode属性值不是EditProgrammatically.
4.单元格,行,列和控件的ReadOnly属性都设置为false.
Four conditions to enable row in datagridview
1. The underlying data source supports editing.
2. The DataGridView control is enabled.
3. The EditMode property value is not EditProgrammatically.
4. The ReadOnly properties of the cell, row, column, and control are all set to false.
' Make the the entire DataGridView read only.
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
这篇关于如何在VB.net中的DataGridView中启用行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文