组合框数据 [英] combo box data

查看:70
本文介绍了组合框数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我使用了一个组合框,它的项目来自数据库,我已经解决了,但是如果我想在组合框中显示的项目是从三个文本框中保存到数据库的,我该怎么办?要使其成为组合框中的一个?我只是使用databing ...数据源和数据成员将数据绑定到我的组合框中..

我有2个表单form1和form2,其中一个表单我有3个文本框txtFname,txtMname,txtLname.

在表单2中,我有一个组合框,我希望5月3日文本框中的那3个文本成为组合框中的1个项目.


范例form1 ....

txtFname.text ="xiro"
txtMname.text ="crack"
txtLastname.text =帮助"


在表格2中,我应该在组合框中将这3个项目视为一个项目

组合框
item1 = xiro破解帮助.........等

这是可能的还是什么主意.

Hello im using a combo box where it''s item came form the database I''ve already solve that but how about if the item I want to be display in my combo box are from three textbox save to database how I am going to make it as one in the combo box? I''ve just use databing ... datasource and data member for binding the data in my combo box..

I have 2 forms form1 and form2 in form one I have 3 textbox txtFname, txtMname, txtLname.

in form 2 I have a combo box and I want that those 3 text in may 3 textbox will be 1 item in my combo box.


Example form1....

txtFname.text = "xiro"
txtMname.text = "crack"
txtLastname.text = "Help"


in form 2 I should see those 3 items in my combo box as one item

combobox
item1 = xiro crack help ......... and so on

is this possible or what any idea please.

推荐答案

我真的无法弄清楚您的确切意思.

请说明:
I really cant figure out what you exactly meant.

Please clarify :
xiroH4ck3r写道:
xiroH4ck3r wrote:

关于我要在组合框中显示的项目是否从三个文本框中保存到数据库

about if the item I want to be display in my combo box are from three textbox save to database



谢谢



Thanks


这很简单.您只需组合这三个字段,如果它们来自数据库,就可以编写SQL来将这三个字段组合为一个字符串.

另外-我删除了您的回复. 答案"按钮(令人惊讶地)是答案,而不是评论.我编辑了您的帖子以包含您的评论.
This is very simple. You just combine the three fields, if they are coming from the DB, you write SQL to combine the three fields to be one string.

Also - I deleted your reply. The ''answer'' button is ( surprisingly ) for answers, not for comments. I edited your post to include your comments.


如何制作该sql语句,请给出示例,请ehhehe


请提供示例片段代码
how to make that sql statement please give example please ehhehe


sample fragment code please


这篇关于组合框数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆