This is a migrated thread and some comments may be shown as answers.

Grid with boolean required issue

3 Answers 142 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Fernando
Top achievements
Rank 1
Fernando asked on 10 Jul 2014, 11:56 AM
Hi, when a boolean which is required is shown on a Grid and i try to create a new element or update one i get an error:
 "[Column Title] is required"

I must set it true to make it work.

You can reproduce this problem on the demo page http://trykendoui.telerik.com/uwEd when you try to create or update an element with the field Discontinued unchecked.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Accepted
aortega
Top achievements
Rank 2
answered on 11 Jul 2014, 04:49 PM
Just remove the validation for this field, since it doesn't make any sense to require a checkbox :)

Discontinued: { type: "boolean", validation: { required: true} }
0
aortega
Top achievements
Rank 2
answered on 11 Jul 2014, 04:51 PM
Oh, well if you need to "Agree" to something it would make sense :)

E.g. 

"I agree, that I am aware of ..... "  
0
Fernando
Top achievements
Rank 1
answered on 14 Jul 2014, 09:01 AM
First of all, thanks aortega for the reply.

I tried it and now i can save an element with this field unchecked. But now doesn't work either because when i save it, i get a null value when expected false value.

Maybe a default value could work but i don't know if is the way to do this properly.

Thanks.

Tags
Grid
Asked by
Fernando
Top achievements
Rank 1
Answers by
aortega
Top achievements
Rank 2
Fernando
Top achievements
Rank 1
Share this question
or