4 Answers, 1 is accepted
Could you elaborate more or demonstrate (in a dojo example for instance) what you mean by "default validation" for the AutoComplete and how do you trigger the widget's validation in your specific scenario?
Regards,
Ivan Danchev
Telerik by Progress
Thank you for your kind reply,
I am using kendo inline grid, and this is my column on which i have an autocomplete editor for it. even i have set required to false in model field declaration also. but when i am creating a new record and trying to save the record leaving poslip(autocomplete field ) as null , it is getting validated. guess this is a default validation for some editors in kendo like dropdownlist will validate by default when not selected. Here I dont need this validation. kindly guide me how to remove this validation.
---------------- // model field declaration --------------
poslip : { type: "string",validation: { required: false}}
------------------// column declaration----------------------
{
ffield: "poslip",
title: "PO Slip",
filterable: false,
editor:AutoCompleteEditor,
autowidth:true }
-------------- editor function-------------------------
function AutoCompleteEditor(container, options) {
var dataSource = new kendo.data.DataSource({
transport: {
read: crudServiceBaseUrl +"getPOSlipNumbers/"+cn+"/"+on+"/"+ot+"/"+sn
},
});
$('<input required="required" name="' + options.field + '"/>')
.appendTo(container)
.kendoAutoComplete({
dataTextField: "poslip",
filter: "startswith",
minLength: 2,
dataSource:dataSource,
placeholder: "Select POSlip"
});
}
}
Please check my update on my question.
Thank you
Have you tried removing the required attribute from the AutoComplete's input? From the code you posted I see you are appending it with this attribute to the container in your AutoCompleteEditor function:
$(
'<input required="required" name="'
+ options.field +
'"/>'
)
Regards,
Ivan Danchev
Telerik by Progress