Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with saving Check Boxes
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00973959
Message ID:
00975345
Views:
23
Hi, Gerard,

Glad it worked out for you.

When you bind, you're essentially saying (in a nutshell)...."take the value of the property (checked) for the control (chkEmployee), evaluate it, and map the value to the datatable/column specified in the 2nd and 3rd parameter of the binding statement".

If you bind the "text" property of a checkbox to a boolean datacolumn, you're not going to get what you want. The text property of a checkbox refers to the caption - you need to map (bind) the checked property (which will return true or false) to the boolean datacolumn.

I agree, coming from VFP, this is initially a surprise, but it also provides more flexibility for generic binding solutions.

In general, you want to bind the property of the control whose evaluated value will directly map to the data.

Dino Esposito has written some excellent articles on data binding in CoDe magazine over the last year or so.

Also, Syncfusion's site on Winforms has some excellent explanations and samples on binding...

http://www.syncfusion.com/FAQ/WinForms/


Hope that helps...
Kevin
Previous
Reply
Map
View

Click here to load this message in the networking platform