hi all,
I am using a Template Form to edit values from a RadGrid, When the grid is displayed the checkboxes appear to be properly bound, and are showing the correct "checked state", based on the value of 1 or 0 coming from the back-end.
However, when I try to update from this edit form, I consistently get the error message "Cannot insert the value NULL into column DepositReceived ...."
I can understand that on a new record ( INSERT ) that these values might be interpreted as NULL, however, as I've just returned the existing data, with valid checkbox values, I don't understand why they are still being seen as NULL ??? This is for all check boxes, including those which are "True" and checked ( please see attached image file )
In the EditForm, I am binding as follows :
Any suggestions are very welcome -- I really don't want to have to deal with code-behind and hopefully I've missed something simple.
thanks in advance
b. stensrud
I am using a Template Form to edit values from a RadGrid, When the grid is displayed the checkboxes appear to be properly bound, and are showing the correct "checked state", based on the value of 1 or 0 coming from the back-end.
However, when I try to update from this edit form, I consistently get the error message "Cannot insert the value NULL into column DepositReceived ...."
I can understand that on a new record ( INSERT ) that these values might be interpreted as NULL, however, as I've just returned the existing data, with valid checkbox values, I don't understand why they are still being seen as NULL ??? This is for all check boxes, including those which are "True" and checked ( please see attached image file )
In the EditForm, I am binding as follows :
<
asp:CheckBox
ID
=
"cbDepositReceived"
runat
=
"server"
Checked='<%#Eval("DepositReceived") %>' />
In the Grid, I am binding as follows :
<
telerik:GridCheckBoxColumn
DataField
=
"DepositReceived"
DataType
=
"System.Boolean"
HeaderText
=
"DepositReceived"
SortExpression
=
"DepositReceived"
UniqueName
=
"DepositReceived"
Visible
=
"False"
DefaultInsertValue
=
"False"
ConvertEmptyStringToNull
=
"False"
>
</
telerik:GridCheckBoxColumn
>
Any suggestions are very welcome -- I really don't want to have to deal with code-behind and hopefully I've missed something simple.
thanks in advance
b. stensrud