从列表框选择中填充文本框 [英] Populating textbox from listbox selection

查看:61
本文介绍了从列表框选择中填充文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我有一个列表框,可从MySql服务器中提取所有数据.

我需要做的是将列表框提取的数据和表中的其他列导出到不同的文本框

Okay, so I have a list box that pulls all its data from a MySql server.

What I need to do is export the data the listbox pulls + other colums in the table to diffrent textboxes

Any help on how to do this?

推荐答案

如果将UserList的ValueMember属性设置为等于用户"表ID的名称,是否有帮助?字段,您可以使用UserList.SelectedValue检索该值.
然后,您可以使用它来查找用于填充文本框的记录.
If you set UserList''s ValueMember property equal to the name of your "users" table''s ID field, you can retrieve that value using UserList.SelectedValue.
You can then use this to find the record you need to use to fill your textboxes.


这篇关于从列表框选择中填充文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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