复选框的多个选择 [英] multiple selection of check boxes

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

问题描述

大家好,

如何在数据库中存储复选框的多个选择.
然后检索值并将其显示在复选框中

请帮助

谢谢,谢谢.

问候,
Praveena

Hello all,

How to store the multiple selection of check boxes in the database.
Then retrieve the values and diplay it in the check boxes

Help please

Thanks and Advance.

Regards,
Praveena

推荐答案

在一个无符号整数字中.每个复选框应对应一个位.我希望您知道如何进行按位算术(二进制OR,AND,(``|'',``&''),``<<'',``>>''等). ).

—SA
In one unsigned integer word. Each check box should correspond to one individual bit. I hope you know how to do bitwise arithmetic (binary OR, AND, (''|'', ''&''), ''<<'', ''>>'', etc.).

—SA


您正在将数据保存到列表中.

我想列表中的数据有点像这样,
You are saving the data into list.

And the data in list is somewhat like this i guess,
1 + 0 + 0 + 1 + and so on..



现在让我们考虑chkbox1 = 1,chkbox2 = 1,chkbox3 = 0,chkbox4 = 0,chkbox5 = 1,所以数据就像



Now let''s consider that chkbox1 = 1, chkbox2 = 1, chkbox3 = 0, chkbox4 = 0, chkbox5 = 1, so the data is like,

1 + 1 + 0 + 0 + 1



现在,您必须按如下所示拆分列表



Now here you have to split the list as shown below

String Data1 = ""
Data1 = Split(List1.List(i), "+")



这里的"+"是您的分隔符

现在检查Data1是否为1然后chkbox1.checked = true否则为false.

希望对您有帮助



Here ''+'' is your separator

Now check if Data1 is 1 Then chkbox1.checked = true else false.

Hope This will help you


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

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