以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 菜单设计 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=57326) |
-- 作者:zhupengfei -- 发布时间:2014/9/23 9:07:00 -- 菜单设计 我在菜单下有个ComboBox,按钮是通过表A的编号列动态加载的。 Dim xz As RibbonMenu.ComboBox = RibbonTabs("测试").Groups("测试").Items("编号选择") 我想限定 combobox的显示的text 。要求,寻找表A中判断为true的行的编号,如果没有,就为最小行的编号,如果还是没有,就在表A下新增编号为001的行,text显示001 我在功能区(名称为测试)的select tab事件下写了下面的代码。没能实现。我想问问。要实现这个功能,我需要在什么事件下写怎样的代码。 Dim tn As DataRow = DataTables("表A").Find("编号","判断 Desc") if tn isnot nothing then xz.text= tn("编号") else dim ts as datarow = datatables("表A").addnew ts("编号")="001" end if
|
-- 作者:Bin -- 发布时间:2014/9/23 9:10:00 -- Dim tn As DataRow = DataTables("表A").Find("判断=True","编号 Desc") if tn isnot nothing then xz.text= tn("编号") else dim ts as datarow = datatables("表A").addnew ts("编号")="001" end if
|
-- 作者:zhupengfei -- 发布时间:2014/9/23 9:30:00 -- 要求,寻找表A中判断为true的行的编号,如果没有,text就为最小行的编号,如果还是没有,就在表A下新增编号为001的行,text显示001 |
-- 作者:Bin -- 发布时间:2014/9/23 9:33:00 -- Dim tn As DataRow = DataTables("表A").Find("判断=True","编号 Desc") if tn isnot nothing then xz.text= tn("编号") else tn = DataTables("表A").Find("","编号") if tn isnot nothing then xz.text= tn("编号") else dim ts as datarow = datatables("表A").addnew ts("编号")="001" end if end if
|
-- 作者:有点甜 -- 发布时间:2014/9/23 9:35:00 -- Dim tn As DataRow = DataTables("表A").Find("判断=True","编号 Desc") If tn IsNot Nothing Then xz.text= tn("编号") Else tn = DataTables("表A").Find("","编号 Desc") If tn IsNot Nothing Then xz.text= tn("编号") Else Dim ts As DataRow = DataTables("表A").addnew ts("编号")="001" End If End If |