Boolean field in editable grid always false on create/update

0 Answers 143 Views
Checkbox Grid
Hunter
Top achievements
Rank 1
Hunter asked on 26 Oct 2022, 10:43 PM

I am using a boolean field in my kendo grid:

"activePin"

model: { id: "id", fields: { accountId: { editable: false }, accountName: { validation: { required: true } }, operatorGroupName: {}, pinCode: { editable: false }, email: { }, cellPhone: { }, note: { }, activePin: { type: "boolean" }, eqpAccess: { editable: false }, } }

The value of this field is set to true or false based on the value of a status field in the read data:


parse: function(response) {
	for (var i = 0; i < response.length; i++) {
		if (response[i].status === 'A') {
			response[i].activePin = true;
		}
		else {
			response[i].activePin = false;
		}
	}
	return response;
},

The column in my grid displays correctly, and when the row is edited, correctly displays a checked checkbox

when true, and an unchecked checkbox when false.

 

In edit mode, if I check the checkbox and press update, the model data being sent to my transport Update or

Create functions is always false, regardless if the box is checked before clicking update.

 

Not sure what I am missing?

Neli
Telerik team
commented on 31 Oct 2022, 10:36 AM

Hi Hunter,

Could you please provide also the Grid configuration? We will need more information regarding the editable mode used on your side.

Looking forward to your reply.

Regards,

Neli

No answers yet. Maybe you can help?

Tags
Checkbox Grid
Asked by
Hunter
Top achievements
Rank 1
Share this question
or