12 Answers, 1 is accepted
The noDataTemplate property can be disabled by setting its value to false:
http://dojo.telerik.com/EXEnu
http://docs.telerik.com/kendo-ui/api/javascript/ui/autocomplete#configuration-noDataTemplate
I hope this is helpful.
Regards,
Stefan
Telerik by Progress
Currently, the letters in the noDataTemplate property will be displayed only in capital letters.
I can suggest submitting a feature request which will allow to modify this behaviour, and based on its popularity we may implement it in a future release:
http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/category/170292-dropdowns
Regards,
Stefan
Telerik by Progress
The noDataTemplate can be disabled using the MVVM approach as well using the following syntax:
data-no-data-template="false"
Please have in mind that all of the jQuery properties can be used with the MVVM approach as well the syntax patent is the following:
http://docs.telerik.com/kendo-ui/framework/mvvm/overview#set-data--options
Regards,
Stefan
Progress Telerik
In js I can set noDataTemplate: false but in MVC I can only set .NoDataTemplate to a string. I tried an empty string but that just gives me the default NO DATA FOUND template
The AutoComplete's MVC wrapper does not allow false to be passed to the NoDataTemplate method, it only accepts string. The "NO DATA FOUND" message can be removed by passing a string containing space:
.NoDataTemplate(
" "
)
In case no data is found the dropdown can be prevented from popping up as shown below:
$(document).ready(
function
() {
var
autocomplete = $(
"#countries"
).data(
"kendoAutoComplete"
);
autocomplete.setOptions({ noDataTemplate:
false
});
});
Regards,
Ivan Danchev
Progress Telerik
Is it possible to do this in an editortemplate? I am currently doing it like this:
$(document).ready(function () {
var contactCombobox = $("#ProductionContact_RecId").data("kendoComboBox");
contactCombobox.setOptions({ noDataTemplate: false });
});
It works, but I would rather have this setting live in the editortemplate so I don't have to set it on every view I use it on. I attached my editor template.
Hello Shannon,
It is possible to call the setOptions method in an event handler of the ComboBox. For example, you are handling the DataBound event handler in the editor template, so you can make the following change to it:
window["ComboBoxContacts_OnDataBound" + '@DdoType'] = function (e) {
e.sender.setOptions({ noDataTemplate: false });
if (@confirmedHasEditRights) {
var element = $("#" + '@comboId');
$(element[0].previousSibling).append($("<span unselectable=\"on\" class=\"k-button k-primary k-clear-value k-i-close rec-details\" title=\"click to update existing\" role=\"button\" tabindex=\"-2\" style=\"width: 18px; height: 18px; padding: 0px; position: absolute; right: 5.5em; top: 1em\" onclick=\"updateContactClickCB()\"><span class=\"k-icon comboBoxButtonsClear k-i-pencil\"></span>"));
$(element[0].previousSibling).append($("<span unselectable=\"on\" class=\"k-button k-primary k-clear-value k-i-close rec-details\" title=\"click to add\" role=\"button\" tabindex=\"-1\" style=\"width: 18px; height: 18px; padding: 0px; position: absolute; right: 3.8em; top: 1em\" onclick=\"addContact()\"><span class=\"k-icon comboBoxButtonsClear k-i-add\"></span>"));
}
};
Regards,
Ivan Danchev
Progress Telerik
Is there any method to do in Angular?
Thank you for your help.
Hi Damcho,
Kendo UI for Angular is a separate product. If you have questions on a specific UI for Angular component, you can ask it in the Kendo UI for Angular forums: https://www.telerik.com/forums/kendo-angular-ui
Regards,
Ivan Danchev
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.