-
XtraReports
Haii. I have a lot of Y & N (yes & no) fields in an Mysql database. They are basically boolean but are stored as varchar 'Y' or 'N'. I want to display checkboxes which are checked while the database value is 'Y' and to unchecked while database field value is 'N'Whats the best way to bind a XRCheckBox to do these?How i can do it?please help me...
-
Re: XtraReports
If it is possible, I would change de DB column to BIT instead of VARCHAR.
If not, you could create a property that returns a boolean instead of a string. Something like
Code:
private string _MyField; //store the DB value in this field
public bool MyField{
get{
return _MyField == "Y";
}
set{
_MyField = (value ? "Y" : "N");
}
}
Bind this property to the checkbox
-
Re: XtraReports
Or, if you have binded the check box to a table in dataset, add fake counted (expression property, I think) column to the table based on rule mentioned by dannystommen and bind the check-box to it.