我如何将数据绑定到Windows应用程序中的小鸡列表框控件 [英] how can i bind the data to chickes list box control in windows application

查看:84
本文介绍了我如何将数据绑定到Windows应用程序中的小鸡列表框控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚上好.我是一名软件开发人员.我是Windows应用程序的新手.我的问题是我不知道如何将数据绑定到Windows窗体应用程序中的小鸡列表框控件.您能指导我,我该怎么做....

Hai good evening. i am working as a s/w developer.i am new for windows application.what my problem is i don''t know how to bind the data to chicked list box control in windows forms application. can you plz guide to me,how can i do this....

推荐答案

您需要绑定SQL或对象的哪种数据?
对于对象,可以执行以下操作

List< string> color = new List< string>();
color.Add("red");
color.Add("red1");
color.Add("red2");
foreach(颜色为s的字符串)
{
mychkList.Items.Add(s);
}

如果您有SQL数据库,则首先获取LIST对象中的内容,然后将其绑定到CheckedListBox控件
which kind of data you need to bind SQL or object ?
for object it can be done as follows

List<string> color = new List<string>();
color.Add("red");
color.Add("red1");
color.Add("red2");
foreach (string s in color)
{
mychkList.Items.Add(s);
}

If you have SQL database then get the content in LIST object first and then bind it to the checkedlistbox control


这篇关于我如何将数据绑定到Windows应用程序中的小鸡列表框控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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