怎样锁定DataGrid单元格中数据不被修改
而其纵横滚动条仍可用呢?
或者有其它较好的access数据显示控件吗(若有请给出基本使用方法)
谢谢
[解决办法]
msflxgrd.ocx
[解决办法]
With MSHFlexGrid1
.TextMatrix(.RowSel, 0) = "√ "
End With
End Sub
Private Sub Command9_Click()
Dim i As Long
With MSHFlexGrid1
For i = 1 To .Rows - 1 '循环删除选种的行
If .TextMatrix(i, 0) = "√ " Then '删除选中的行
.TextMatrix(i, 0) = "× "
Adodc1.Recordset.ActiveConnection.Execute "Delete From Data Where " & Adodc1.Recordset.Fields(0).Name & "= ' " & Trim(MSHFlexGrid1.TextMatrix(i, 1)) & " ' "
End If
Next i
End With
[解决办法]
在窗体的LOAD事件中加
DataGrid1.AllowUpdate = false
或设计时用鼠标右键点击DataGrid控件在其属性页通用项中,将允许更新钩取消。