以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 全局表事件的PrepareEdit,效果却是只在主表中显示,而相应的副本表的功能却失效了,求应该怎么改? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=137285) |
-- 作者:fengwenliuyan -- 发布时间:2019/7/2 16:28:00 -- 全局表事件的PrepareEdit,效果却是只在主表中显示,而相应的副本表的功能却失效了,求应该怎么改? Select Case MainTable.Name Case "入库表" ,"出库表" If e.IsFocusCell Then \'如果是焦点所在单元格 Select Case e.Col.name Case "客户" e.Col.Combolist = DataTables("入库表").GetComboListString("客户", "[车间] = \'" & e.Row("车间") & "\'") Case "品名规格" e.Col.Combolist = DataTables("入库表").GetComboListString("品名规格", "[客户] = \'" & e.Row("客户") & "\'") End Select End If Case "过磅表" If e.IsFocusCell Then \'如果是焦点所在单元格 Select Case e.Col.name Case "客户" e.Col.Combolist = DataTables("过磅表").GetComboListString("客户", "[车间] = \'" & e.Row("车间") & "\'") Case "品名规格" e.Col.Combolist = DataTables("过磅表").GetComboListString("品名规格", "[客户] = \'" & e.Row("客户") & "\'") End Select End If End Select 请问,以上代码写在全局表事件的PrepareEdit中,且Initialize项目事件已开启: For Each dt As DataTable In DataTables dt.GlobalHandler.PrepareEdit = True Next 但是,效果却是只在主表中显示,而相应的副本表的功能却失效了,求应该怎么改? |
-- 作者:有点蓝 -- 发布时间:2019/7/2 16:39:00 -- Case "入库表" ,"出库表","窗口1_table1" 加上副本表的名称 |
-- 作者:fengwenliuyan -- 发布时间:2019/7/2 16:51:00 -- 回复:(有点蓝)Case "入库表" ,"出库表","窗口1_tab... 既然已经是全局表事件中设置了,为什么还要专门制定副本表? 代码中已经设定过: 如主表为“入库表”的所有副表,包括主表和窗口副本表都应该同理的吗? 是我理解有误吗?
|
-- 作者:fengwenliuyan -- 发布时间:2019/7/2 16:59:00 -- 回复:(有点蓝)Case "入库表" ,"出库表","窗口1_tab... Select Case MainTable.Name Case "入库表" ,"出库表" ,"开单界面窗口_入库表" ,"开单界面窗口_出库表" ,"录入界面窗口_入库表" ,"入库界面窗口_入库表","出库界面窗口_出库表" ,"定位入库窗口_入库表" If e.IsFocusCell Then \'如果是焦点所在单元格 Select Case e.Col.name Case "客户" e.Col.Combolist = DataTables("入库表").GetComboListString("客户", "[车间] = \'" & e.Row("车间") & "\'") Case "品名规格" e.Col.Combolist = DataTables("入库表").GetComboListString("品名规格", "[客户] = \'" & e.Row("客户") & "\'") End Select End If Case "过磅表","过磅界面窗口_过磅表","过磅窗口_过磅表" If e.IsFocusCell Then \'如果是焦点所在单元格 Select Case e.Col.name Case "客户" e.Col.Combolist = DataTables("过磅表").GetComboListString("客户", "[车间] = \'" & e.Row("车间") & "\'") Case "品名规格" e.Col.Combolist = DataTables("过磅表").GetComboListString("品名规格", "[客户] = \'" & e.Row("客户") & "\'") End Select End If End Select 窗口表依旧失效?
|
-- 作者:有点蓝 -- 发布时间:2019/7/2 17:02:00 -- Select Case MainTable.Name 改为 Select Case e.Table.Name
|
-- 作者:fengwenliuyan -- 发布时间:2019/7/2 17:16:00 -- 回复:(有点蓝)Select Case MainTable.Name改为Sele... Select Case e.Table.Name Case "入库表" ,"出库表" ,"开单界面窗口_入库表" ,"开单界面窗口_出库表" ,"录入界面窗口_入库表" ,"入库界面窗口_入库表","出库界面窗口_出库表" ,"定位入库窗口_入库表" If e.IsFocusCell Then \'如果是焦点所在单元格 Select Case e.Col.name Case "客户" e.Col.Combolist = DataTables("入库表").GetComboListString("客户", "[车间] = \'" & e.Row("车间") & "\'") Case "品名规格" e.Col.Combolist = DataTables("入库表").GetComboListString("品名规格", "[客户] = \'" & e.Row("客户") & "\'") Case "工序" e.Col.Combolist = DataTables("入库表").GetComboListString("工序", "[客户] = \'" & e.Row("客户") & "\' And [品名规格] = \'" & e.Row("品名规格") & "\'") Case "单位" e.Col.Combolist = DataTables("入库表").GetComboListString("单位", "[客户] = \'" & e.Row("客户") & "\' And [品名规格] = \'" & e.Row("品名规格") & "\' And [工序] = \'" & e.Row("工序") & "\'") End Select End If Case "过磅表","过磅界面窗口_过磅表","过磅窗口_过磅表" If e.IsFocusCell Then \'如果是焦点所在单元格 Select Case e.Col.name Case "客户" e.Col.Combolist = DataTables("过磅表").GetComboListString("客户", "[车间] = \'" & e.Row("车间") & "\'") Case "品名规格" e.Col.Combolist = DataTables("过磅表").GetComboListString("品名规格", "[客户] = \'" & e.Row("客户") & "\'") Case "工序" e.Col.Combolist = DataTables("过磅表").GetComboListString("工序", "[客户] = \'" & e.Row("客户") & "\' And [品名规格] = \'" & e.Row("品名规格") & "\'") Case "单位" e.Col.Combolist = DataTables("过磅表").GetComboListString("单位", "[客户] = \'" & e.Row("客户") & "\' And [品名规格] = \'" & e.Row("品名规格") & "\' And [工序] = \'" & e.Row("工序") & "\'") Case "流水线" e.Col.Combolist = DataTables("过磅表").GetComboListString("流水线", "[客户] = \'" & e.Row("客户") & "\' And [品名规格] = \'" & e.Row("品名规格") & "\' And [工序] = \'" & e.Row("工序") & "\'") End Select End If End Select 其他表都生效了,但是,含有“出库表”的副本表全都失效了?
|
-- 作者:有点蓝 -- 发布时间:2019/7/2 17:28:00 -- 确定副本表名称是正确的 既然副本Table是独立的,所以它必须有自己的名称,这样才能和原Table区分开来,其名称为 : 窗口名称_控件名称 |