如何禁用和取消选中数据库字段中的复选框值. [英] how to disabled and uncheck the checkbox values from database fields..VB.NET !
问题描述
如何禁用和取消选中数据库字段中的复选框值.
how to disabled and uncheck the checkbox values from database fields..
如果我在数据库记录中输入的内容为:
if i have entry in my database records as :
Name Seats Date
Sumit 1,3 11-Dec-2010
Sanjeev 2,4 12-Dec-2010
Manish 1,3,4 11-Dec-2010
我想在页面加载事件中将今天的默认日期设置为2010年12月11日,然后禁用checkbox1,checkbox2,checkbox3,checkbox4并在2010年12月11日取消选中状态
I want on page load event the default date for todays is 11-Dec-2010 then checkbox1, checkbox2, checkbox3, checkbox4 will be disabled and unchecked state for 11-Dec-2010
在上述数据库结构中,您看到2010年12月11日的席位是1,2,3,4,因此chekbox1,checkbox2,checkbox3,checkbox4将被禁用...
as you see on the above database structure the seats for 11-Dec-2010 is 1,2,3,4 so the chekbox1, checkbox2, checkbox3, checkbox4 will be disabled...
我想在VB.NET中使用此代码段!有人可以帮我吗?
I wanna this code snippet in VB.NET !! Can anybody help me in that ???
推荐答案
您应规范化您的数据库-座位
字段未规范化,只能容纳一个项目.
You should normalize your database - the Seats
field is not normalized and should only hold one item.
在字段中使用逗号分隔的值是不好的做法.如果其中只有一个值,如下所示:
Having comma delimited values in a field is bad practice. If you had a single value in it like the following:
Name Seats Date
Sumit 1 11-Dec-2010
Sumit 3 11-Dec-2010
Sanjeev 2 12-Dec-2010
Sanjeev 4 12-Dec-2010
Manish 1 11-Dec-2010
Manish 3 11-Dec-2010
Manish 4 11-Dec-2010
删除记录将与取消选中相关,添加一条记录将与选中复选框相关.
Removing a record would correlate to unchecking and adding one would correlate to checking a checkbox.
这篇关于如何禁用和取消选中数据库字段中的复选框值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!