使用列表框和表单. [英] Working with listbox and forms.

查看:75
本文介绍了使用列表框和表单.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的编码员,

建议我一些真正的好参考,以使用列表框从数据库中获取数据并在表单视图中查看数据...

Dear Coders,

Suggest me some real good references to work with listbox to fetch data from database and view the data in form view...

推荐答案

只需将列表框控件添加到表单设计器中,从要显示数据的位置填充数据表,然后使用DisplayMember和ValueMember属性将其绑定到列表框.

试试这个,让我们知道您是否有任何问题
Just Add Listbox control to your form designer, populate a datatable from where you want to display data and bind it to listbox using DisplayMember and ValueMember Properties.

Try this and let us know if you have any problem


这篇关于使用列表框和表单.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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