I'm trying to do a very easy thing - set whether a checkbox is checked or not based on the boolean value in a row coming in. I had originally had an 'if then' statement, but the results appeared to be arbitrary. So I pared it down to just this, and I still don't understand what it happening.
The code is as follows:
There are two rows in the database, one which has the boolean flag set to on (1) and the other to off (0), both rows on the screen show as unchecked.
I change the line to:
and both lines come back as checked. Note that all of the other data for the both of the rows is populating correctly. Just not the check boxes!
If I change the line to:
they both come back checked.
I don't understand ..?
Aucun commentaire:
Enregistrer un commentaire