提問者
vb multicolumn combobox

問題
所有回覆
-
Thanks for your reply.
My problem like this:
In combobox I cant just show ID number,user difficult to refer what is that, so I need to display ID with the ID refer member,it can easy for user to understand.
I wish combobox can show the ID and also member,but after select,combobox only return the selected ID for process.
Please give some suggestion.
2011年5月5日 1:29 -
你好,
這裡是中文論壇,請發到英文論壇:
http://social.msdn.microsoft.com/Forums/en-US/category/visualbasic
Best regards
Liliane Teng [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
2011年5月5日 7:47 -
Hi,
I think you should be polite, the job of a modrator is that taking care of the forum.
However, see this code:
Dim items As New DataTable items.Columns.Add("id", Type.GetType("System.Int32")) items.Columns.Add("value", Type.GetType("System.String")) items.Rows.Add(1, "my") items.Rows.Add(2, "your") Me.ComboBox1.DataSource = items Me.ComboBox1.DisplayMember = "value" Me.ComboBox1.ValueMember = "id"
Have a nice day.
Call me ghost for short, Thanks
To get the better anwser, it should be a better question.2011年5月5日 10:01 -
Hello, you may take a look at this developer article: http://www.codeproject.com/KB/cpp/multicolumncombo.aspx :)2011年7月2日 7:06
-
HK Forum is also supporting ENGLISH!!!!!!!!!!!! NOT ONLY T.CHINESE!!!!!! NOT ONLY S.Chinese!!!!!
大家一齊探討、學習和研究,謝謝!
MCSD, MCAD, MCSE+I, MCDBA, MCDST, MCSA, MCTS, MCITP, MCPD,
MCT, Microsoft Community Star(TW & HK),
Microsoft MVP for VB.NET since 2003
My MSMVP Blog2012年11月10日 18:19