How to load checkbox state data from database?

I have MySQL database to store the handsontable data. Everything is working fine. But the problem is with the checkbox. If I check the checkbox it stores the value ‘true’ in the database and leave blank if unchecked. The database column is VCHAR. When I load the data it not shows the checked items. My load script is as follows:

var data = [], row;

                  for (var i = 0, ilen = res.cars.length; i < ilen; i++) {
                    row = [];
                    row[0] = res.cars[i].manufacturer;
                    row[1] = res.cars[i].year;
                    row[2] = res.cars[i].price;
			row[3] = res.cars[i].available;
                    data[res.cars[i].id - 1] = row;
                  }

The ‘available’ column is the checkbox.
I also noticed that the autosave is also not working for the check box, although the ‘save’ button successfully store the data in database.

I am just modifying the PHP Demo (https://github.com/handsontable/handsontable/blob/master/demo/php.html)

I find the problem, res.cars[i].available; in the above code returns the database value ‘true’. I have to set the checkbox value=res.cars[i].available; for each row. But unfortunately I am not very much comfortable with JS. So if any one can help me to how to obtain that it will be very helpful.

I solved it out. Just set the column type to ‘checkbox’ and in MySQL I set the type of the ‘available’ column to ENUM with two values ‘false’ and ‘true’ and set default value to ‘false’ with NOT NULL

Glad you’ve solved this one out.
Thanks for keeping us updated.