Link to home
Start Free TrialLog in
Avatar of brdrok
brdrok

asked on

"string was not recognized as a valid boolean" datagrid checkbox

Hello,

I have a checkbox in my databound datagrid.  however, when attempting to change the checkmark, I get the following error:

string was not recognized as a valid boolean.

anyone here know how to resolve this issue?

thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of gillgates
gillgates

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gillgates
gillgates

Thats right, but my point is "true" is a string... I was just doing some vb6 earlier today and confused myself.
Avatar of brdrok

ASKER

Hello

thanks for the answers.  the answer pointed me in the right direction....

my original code was

//creating column
System.Windows.Forms.DataGridBoolColumn dbc = new DataGridBoolColumn();
dbc.TrueValue = "Yes";  //-----> changed it to dbc.TrueValue = true;
dbc.FalseValue = "No";  //-----> changed it to dbc.FalseValue = false'
tableStyle.GridColumnStyles.Add(dbc);
tableStyle.GridColumnStyles[1].HeaderText = "Scaled?";
tableStyle.GridColumnStyles[1].MappingName = myDataSet.Tables[0].Columns["Scaled"].ColumnName;


Avatar of brdrok

ASKER

i split the points 100:25....hope you guys think it's fair.

thanks