Value Checked

ValueChecked works in coordination with ValueUnchecked to specify the field values generated when the DBCheckBox control is modified,, The control works two ways based on the value in this property. If the value in the field of the dataset matches the value in this property, thfiU DBCheckBox appears checked. On the other hand, if the DBCheckBox checked by the user, the field's value is set to the string contained in-ValueChecked.

The ValueChecked property can represent several values in a semici lon-limited list of items. If the field value matches any of the items the list, the check box is checked. As an example, the vaiue of ValueChecked can be set to "Yes;Si;Oui". If the value of the assigned dataset field matches any of these three items in a case-insensitive com parison, the DBCheckBox will be checked. If the user clicks on an unchecked check box, the first element of the list will be assigned to the dataset field.

The same set of conditions exists for the ValueUnchecked property. If, on comparison, the value in the assigned dataset field does not match either of the two property's values, the check box is grayed out. This action is dependent on the value of AllowGrayed of course.

Was this article helpful?

0 0

Post a comment