Page 1 of 1

CheckBox - True/False

Posted: 03 Aug 2009, 15:44
by itmg
Hi,
new problem with the CheckBox control.
My SQL Server Table has a datacolumn which stores a boolean; values: True/False (-1/0).
The checkbox control is bound to this data field. I thought the checkbox will be checked when the value of the datafield is 'true'. But it only get the 'SelectionState' = 'checked', when the value of the data field is 1.

Re: CheckBox - True/False

Posted: 04 Aug 2009, 12:01
by TiKu
Currently, negative values raise an error. Although it seems dirty, I think I'll simply allow a value of -1 and handle it like 1 (Checked).

Re: CheckBox - True/False

Posted: 05 Aug 2009, 09:38
by TiKu
Try the attached revision. It handles -1 like 1 (ssChecked).

Re: CheckBox - True/False

Posted: 06 Aug 2009, 12:41
by itmg
it works.

Thank you!