开发者

How to make a checkbox selected when searching from database

开发者 https://www.devze.com 2023-01-05 20:37 出处:网络
i created a form,containing fields emloyeeid,em开发者_JAVA技巧ployeename,age...,and a checkbox. When searching using employeeid ,i want to the checkbox selected/deselected according to the value saved

i created a form,containing fields emloyeeid,em开发者_JAVA技巧ployeename,age...,and a checkbox. When searching using employeeid ,i want to the checkbox selected/deselected according to the value saved in the database(the checkbox field in database is boolean)


Really depends on your db access approach, one example.

 checkbox1.Checked = reader.GetBoolean(ordinal);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号