I have a bit defined in my database 0=no, 1=yes. I have a silverlight combo with the values “Yes” and “No” in it. How can I bind my bit value to the combo?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t state what data access machinary you are using but the typical tools will expose a bit field as a boolean property. The easiest approach would be to use a value converter.
Here is the basic idea (might need some more defensive coding):-
With that in your application you can now add it to a
Resourcesproperty (typically the App.xaml)Now you would create your combobox like this:-