发现一个很奇怪的问题。
控件中的副本表属性AllowEdit为false的时候,
afterload里面写cols代码AllowEdit为true(代码如下),结果不起作用,所有列不允许编辑,整个表被锁定。
但是反过来,
控件中的副本表属性AllowEdit为true的时候,
afterload里面写cols代码AllowEdit为false,结果就可以,只锁定对应列。
为什么会这样咧?
Dim tr As Row = Tables("副-订单编辑_Table1").Current
With Tables("副-订单编辑_Table1")
If User.Group = "门店" Then
If tr("订单状态") = "门店新订单"
.Cols("需求量").AllowEdit = True
.Cols("物料备注").AllowEdit = True
End If
If tr("订单状态") = "仓库已出货"
.Cols("实收量").AllowEdit = True
End If
Else If User.Group = "PMC" Then
If tr("订单状态") = "已提交PMC"
.Cols("分配量").AllowEdit = True
.Cols("物料备注").AllowEdit = True
End If
Else If User.Group = "分拣员" Then
If tr("订单状态") = "PMC已确认"
.Cols("实发量").AllowEdit = True
End If
Else If User.Group = "仓库" Then
If tr("订单状态") = "门店已回单"
.Cols("结算量").AllowEdit = True
End If
End If
End With