I have a strange issue. I have a grid, with a pop-up editor template, with a boolean field.
This has been working fine until recently, when (I assume after an update to PHP or the MariaDB backend) inserting new records now fails when the checkbox is left unchecked.
After a lot of searching, I found the error message being returned through JSON.
It is {"errors":["Incorrect integer value: '' for column 'Read' at row 1"]} . It seems the grid is passing '' instead of 0, for a false value.
If the checkbox is ticked, a new record is inserted without a problem. The issue also affects updates, the checkbox can be ticked, but not unchecked.
The field is defined as a boolean in the model definition:-
$readField
=
new
\Kendo\Data\DataSourceSchemaModelField(
'Read'
);
$readField
->type(
'boolean'
);
And the checkbox is defined as :-
<p><label>Read?:</label><input type=
"checkbox"
name=
"Read"
data-bind=
"value:Read"
> </p>
In the editor template definition
I have tried updating to the latest version of KendoUI, but the problem still persists
The field is a type TinyInt in the database, and is non nullable.