加载选中的列表框 [英] Loading a checked listBox

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

问题描述

您好,请帮助,对编程来说是一个新手.我想将我的数据库表之一加载到选中的ListBox控件中,以便在删除记录时,我能够检查多个记录并立即单击删除按钮.请帮我提供一个示例代码,我可以用它来解决这个问题.

您忠实的
Martin

Hi there, please help, am very new to programming. i want to load one of my database tables into a checked ListBox Control, so that, when am deleting records, i can be able to check multiple records and click the delete button at once. please help me with a sample code i can use to go about this.

Yours faithfully
Martin

推荐答案

katumbamartin写道:
katumbamartin wrote:

请帮助,这对编程来说是一个新手.

please help, am very new to programming.



您在什么情况下编写代码?




In what context are you writing code then ?


katumbamartin写道:
katumbamartin wrote:

我想将我的数据库表之一加载到选中的ListBox控件中,以便在删除记录时,我能够检查多个记录并立即单击删除按钮

i want to load one of my database tables into a checked ListBox Control, so that, when am deleting records, i can be able to check multiple records and click the delete button at once



列表框具有数据源属性.然后,您可以遍历其checkeditems集合以找到要删除的项目.在不了解数据库模式的情况下不可能编写示例代码,但是无论哪种方式,如果您太新了,则应该先学习C#,然后再担心同时学习SQL.



A listbox has a data source property. Then you can iterate over it''s checkeditems collection to find the items to delete. It''s not possible to write sample code without knowing your DB schema, but either way, if you''re so new, you should learn C# before you worry about learning SQL at the same time.


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

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