C#帮助在C#中以windowform的形式在组合框中加载数据 [英] c# help to load a data in combobox in windowform in c#

查看:65
本文介绍了C#帮助在C#中以windowform的形式在组合框中加载数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在c#中有一个组合框,我想从数据库中将其放在comb0box中.
例如,我在数据库中有一些名称存储,我想在组合框中输入s,所有名称均以在组合框中加载的字母s开头.
thanx

i have a combobox in c#,i want to have item in comb0box from database.
e.g i have some name store in database i want to enter s in combobox all names start with letter s load in combobox.
thanx

推荐答案

cmBox.DataSource = dt;
          cmBox.DisplayMember = "Col1";
          cmBox.ValueMember  = "Col2";


这里有一些想法:

http://asimsajjad.blogspot.com/2009/02/loop-through- checkboxlist-control-in.html [ ^ ]
http://www.dotnetcurry.com/ShowArticle.aspx?ID=236 [ ^ ]
Here are some ideas:

http://asimsajjad.blogspot.com/2009/02/loop-through-checkboxlist-control-in.html[^]
http://www.dotnetcurry.com/ShowArticle.aspx?ID=236[^]


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

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