以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  多行 Combobox  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=31716)

--  作者:tommyfung
--  发布时间:2013/4/19 13:35:00
--  多行 Combobox

Combobox 可否做多行资料显示, 返回指定行值.


--  作者:XYT
--  发布时间:2013/4/19 14:10:00
--  

http://www.foxtable.com/help/topics/0932.htm

用这个可以吧


--  作者:Bin
--  发布时间:2013/4/19 14:10:00
--  
能说具体点吗?  如果说把每行的某个列的值对应添加进去 显示. 这是可以的.
--  作者:tommyfung
--  发布时间:2013/4/19 15:58:00
--  

我想 combolist 内显示多行

 

如 :    

ADMIN | 行政部

ENG    | 工程部

INJ      | 注塑部

...

 

如选第一行 返回值 为 : ADMIN 

 

这用在窗口 e.form, 不是Table中


--  作者:tommyfung
--  发布时间:2013/4/19 16:04:00
--  

\' Load WI # from SQL cmd for use in combobox
Dim cmd As New SQLCommand
Dim dt As DataTable
Dim cmb As WinForm.ComboBox
cmd.C

cmd.CommandText = "SELECT category From {GBJCAT1} where suspended = \'N\' "   
dt = cmd.ExecuteReader()
cmb = e.Form.Controls("ComboBox2")
cmb.ComboList= dt.GetComboListString("category")

 

但 GBJCAT1 表有 Category, Description, Dept 要在combobox2 显示, 返回 category .

 

[此贴子已经被作者于2013-4-19 16:06:25编辑过]