469,356 Members | 2,168 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

retrieve data in checkbox control from database.

hi i m working on windows application using c#.
i have to retrieve data from database in checkbox control but its giving the following error---cannot convert object to bool.

the code i am typing is
checkbox1.checked=convert.toboolean(ds.tables[0].rows[0][1]);

if i m using a flag variable bool a= convert.toboolean(ds.tables[0].rows[0][1]);
if(a==true)
checkbox1.checked=true)

then its giving the following error---- string nt recognised as valid boolean
plz help me.
Feb 3 '07 #1
1 1896
kenobewan
4,871 Expert 4TB
This thread may help:
how to check unchek checkboxes using xml
Feb 3 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by charliewest | last post: by
reply views Thread by AZ Jack | last post: by
6 posts views Thread by Daz | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.