I'm creating a kendo multiselect from a select input. The kendo control renders out a basic input text box and a custom drop down that is displayed as you type. The issue I'm having is that the input it triggering the default web browser autocomplete dropdown which is overlaying the kendo dropdown. I need to disable the default web browser behavior so that only the kendo dropdown is displayed. I've tried adding the autocomplete="off" attribute to the select tag that the kendo multiselect is initialized from but the resulting tag that is rendered by kendo does not carry this attribute over.
Never mind, I simply used the 'input' field off of the kendo object to access the input and then added the attribute after the kendo control was initialized
$('#multiSelect').data('kendoMultiSelect').input.attr('autocomplete', 'off');
This resolved the issue
Related
I am working on a page that has a Telerik UI for MVC ComboBox. Currently the ComboBox does not keep user input once the datasource has returned any value from the database. Even if you reload the page, the ComboBox will remember the value from the Datasource and delete any user input once the focus is changed to another input field.
I need the ComboBox to keep user input if they do not select a value from the Datasource populated drop-down. Any help would be appreciated.
So I found the answer on the Kendo UI API reference. If you set the .SyncValueAndText(boolean) to false it will allow custom text to stay in the ComboBox. By default this value is set to true which binds the text and value together.
Here is a link to the API Documentation:
https://docs.telerik.com/kendo-ui/api/javascript/ui/combobox/configuration/syncvalueandtext
On Asp.Net MVC page, grid has two column of drop down editor template.
On Load, it works fine. I can see the dropdown populated with values.
After postback, the drop down list is getting empty/blank.
Editor template are placed under Views/Shared/EditorTemplates.
How to retain values dropdown values after postback?
Data for Editor template comes from view data. So I refilled the view data info on the POST method.
I am using kendo ui controls for the first time in mvc.
1> #Html.Kendo().TextBoxFor(model => model.field).Name("txtFirstName")
how do I reset the value to empty string and disable a kendo textboxfor using jquery?
for some controls I am able to do something like this, but for the kendo.Textbodfor() I donot know what to pass in the .data()
var txtLastName= $("#LastName").data("kendoAutoComplete");
txtLastName.value("");
txtLastName.enable(false);
2> this partial view only renders a textbox - how to reset the value to an empty string and disable the textbox rendered by the partial view
<li>#Html.Partial("~/Views/xyz/_AutoComplete.cshtml")</li>
When using #Html.Kendo().TextBoxFor the generated output doesn't generate a Kendo widget it is simply an input element.
You just need to use some jQuery or Javascript to do what you want.
$('#txtFirstName').removeAttr("value")
$('#txtFirstName').prop("disabled", "disabled")
Does kendo have any option to set FOOTER template like header ?
My requirement is to show some content in Footer, say that "Type more for refine search"
The Kendo Combobox does not support footers.
http://www.telerik.com/forums/footer-template-in-combobox
The ComboBox widget does not support footerTemplate. As an alternative
solution I suggest putting the checkbox outside of the widget and use
the setOptions method to modify the filter that is used by the widget.
For example:
Firstly, I am doing a research on KendoUI, and my experience is mainly on struts-layout taglib.
And now I got issues on HTML Form while using KendoUI.
My Questions are as below:
Can Kendo ListView be used to replace the html form? That is, there is no Form any more, but a kendo ListView.
If still use html form, how to make each field editable in line (is there any kendo widget to do same behavior as JQuery UI plugin X-editable)?
The closest thing would probably be a Grid that is editable. Clicking on a cell puts it in edit mode: http://demos.telerik.com/kendo-ui/grid/editing
But you could also make a custom Kendo UI widget that behaves basically the same as x-editable by having a clickable element that opens a Kendo Tooltip box with an input element in it.