Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 16th, 2006, 03:55 PM
Registered User
Join Date: May 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Binding a checkbox that contain Y/N values

I am running into the following error attempting to bind a check box with the following code:

runtime error: "String was not recognized as a valid Boolean."


checkAcademicBox1.DataBindings.Add("checked",custo merDataSet, "customer.usr_sp_academic");

Any advice on how to approach this and eliminate error?

Old May 17th, 2006, 07:23 PM
Authorized User
Join Date: Apr 2006
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts

This field, customer.usr_sp_academic, is of type string... for this binding to work, the filed value must be "false" or "true".... Other way is to change the field type to bool instead of string

Similar Threads
Thread Thread Starter Forum Replies Last Post
binding a checkbox ?? msordo VB.NET 2002/2003 Basics 0 April 9th, 2008 05:35 PM
CheckBox binding in ListView - Multiple events! dweezilb Windows Presentation Foundation 1 April 22nd, 2007 06:39 PM
Checkbox values HELP! vkwebcommander Classic ASP Databases 2 January 18th, 2005 09:29 AM
binding an tinyint to a CheckBox control... ShadowMoon ADO.NET 0 October 26th, 2004 05:55 AM
checkbox values zaman1111 Javascript 2 September 22nd, 2004 04:19 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.