当点选父行时,子表自动显示相关子行,请问切换的原理是?
因为我在全局表事件beforefilter增加了代码,作为对beforeselchange的补充。在单个表中已经运作很好。
但是当关联子表增加一行后点选父表切换其他订单时,子表没能触发beforefliter事件和beforeselchange事件的其中一个。所以请问关联表切换的原理是?
beforefliter事件:
If e.Table.Current Is Nothing Then
Return
Else
Dim r As Row = e.Table.Current '获得原来选择的行
Dim p As String
If r.DataRow.RowState = DataRowState.Added Then
p = "A#"
r.Save()
Dim msg As String = p & e.Table.DataTable.Name & "#" & r("_Identify")
For Each bd As QQBuddy In QQClient.Buddies
If bd.Online Then
QQClient.Send(bd.name, msg)
End If
Next
Else If r.DataRow.RowState = DataRowState.Modified Then
p = "U#"
r.Save()'一定要在保存后合成信息,因为新增行的主键在保存后才生成
Dim msg As String = p & e.Table.DataTable.Name & "#" & r("_Identify")
For Each bd As QQBuddy In QQClient.Buddies
If bd.Online Then
QQClient.Send(bd.name, msg)
End If
Next
End If
End If
[此贴子已经被作者于2018/7/9 10:20:44编辑过]