Groups | Blog | Home
all groups > dotnet windows forms databinding > november 2004 >

dotnet windows forms databinding : binding checkbox


Pete Hearn
11/20/2004 3:02:06 PM
Greetings All

Can anyone tell me how to bind a checkbox to a database field? Most
Booleans are stored in fields of type Char(1) in SqlServer. "1" is True,
"0" is False.

It seems to me I need a way of specifying the Boolean expression as the
binding value, but the IDE merely allows me to select a field, which then
crashes at run time.

Any suggestions much appreciated.

Thanks
Pete

Pete Hearn
1/2/2005 5:49:49 PM
Seems the best way is to use a text box and ask the users to type in 1 or 0.
Does work, though it looks crap.

AddThis Social Bookmark Button