Foxtable(狐表)用户栏目专家坐堂 → ComboBox自定义值问题


  共有2212人关注过本帖树形打印复制链接

主题:ComboBox自定义值问题

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107861 积分:548662 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/8/28 16:15:00 [显示全部帖子]

参考:http://www.foxtable.com/webhelp/topics/1523.htm

比如:

第二个控件的Enter事件中加入代码:

Dim cmb As WinForm.ComboBox = e.Sender

dim cs as string = "A|B|C"

Dim str As string = e.Form.Controls("ComboBox1").Value

cs = ("|" & cs & "|").replace("|" & str & "|","|").trim("|")

cmb.ComboList = DataTables("表A").GetComboListString(cs)


 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107861 积分:548662 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/8/28 17:41:00 [显示全部帖子]

搞错,应该是


Dim cmb As WinForm.ComboBox = e.Sender

dim cs as string = "A|B|C"

Dim str As string = e.Form.Controls("ComboBox1").Value

cs = ("|" & cs & "|").replace("|" & str & "|","|").trim("|")

cmb.ComboList = cs


 回到顶部