I ordered the source, but I can not do it for 'value'.
I use the multiselect with MVVM.
My html code:
<select id="doc" data-role="multiselect"
data-value-primitive="true"
data-text-field="name"
data-value-field="id"
data-bind="value: valueDoc,
source: sourceDoc"></select>
My js code:
vm = kendo.observable({
sourceDoc: new kendo.data.DataSource({
data: [],
sort: { field: "name", dir: "asc" }
})
});
The value is not ordered
I followed this example to add values to the multiselect without using a popup, but I noticed that whenever the multiselect loses its focus, the text that has been typed on it disappears.
I wish to avoid this behavior, since it would be annoying to a user to type something and click somewhere else and that value to be lost.
Is this possible?
Hi, we have some multiselect with tons of data (about 5000+).
That makes the "dom" very charged and the ui slow.
We found a part of the solution, in that dojo:
https://dojo.telerik.com/@foxontherock/oDerIDAg/3
DOM is very light as we only display first 50 items, and if the user "search" for the items, it finds it on any page. The value is correctly set.
But, when I load the item with values, they are not set if they are not on page 1.
But, the solution is near, as they are correctly set when we select it from a search...
Do you need to fix something, or is there an easy solution I can do to make the items correctly set initially?
Thank you.
hello every body.
i have a multiselect widget which i want to have fixed height and if items are more than the width , it should scroll vertically instead of increasing height size.
i used this css class and everything is fine in chrome. it has a vertical scroll bar.
.k-multiselect-wrap{height:30px;overflow:auto}
but when i open my project in firefox the scrollbar is not there , and i just can scroll vertically with mouse wheel.
could you please help me to fix this issue ?
I notice that kendo has a new feature to customize the noDataTemplate. Then you can use that to allow user adding a new item when there is no match.
Just like this example: http://demos.telerik.com/kendo-ui/multiselect/addnewitem
But what if I want to add a new item of partial match. Say you have "Chai" in the options, but I want to add "Cha". Can we do that with kendo?
Hi Team,
Getting ajax call twice for same input if specifying minLength in multiselect. Could you please suggest why ajax call invoke twice for same input with minLength.
HTML:<div><select id="required" multiple="multiple" style="width: 92.5%; margin-top: 21px; margin-left: 2px;" "></select></div>
JS Code:
var searchuserdataSource = new kendo.data.DataSource({
pageSize: 30,
serverFiltering: true,
transport: {
read: function (options) {
var srctxt = {
//searchText: $('#required').data("kendoMultiSelect").input.val()
searchText:"Test"
};
var params = "{searchText: '" + srctxt.searchText + "'}";
$.ajax({
type:"POST",
url: "./Relationships.aspx/GetUserSearch",
data: params,
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (result) {
var userslist = [];
if (typeof result.d !== 'undefined' && result.d.Completed)
{
$.each(result.d.Data, function (i, item) {
var map = {};
map["id"] = item.Id;
map["name"] = item.DisplayName;
userslist.push(map);
});
}
options.success(userslist);
},
error: function (result) {
options.error(result);
}
});
}
}
});
$("#required").kendoMultiSelect({
autoBind: false,
minLength: 3,
enforceMinLength: true,
dataSource: searchuserdataSource,
dataTextField: "name",
dataValueField: "id",
//itemTemplate :"<input type='checkbox' id='#:data.id#'/> #:data.name#",
//itemTemplate: " <input type='checkbox' name ='#:data.name #' value ='#:data.id#' class='k-checkbox' /><label class='k-checkbox-label' value='#:data.id#' > #:data.name# </label>",
//itemTemplate:"<input type='checkbox' name='#:data.name # value='#:data.id #' class='k-checkbox' />" +
//"<span class='k-checkbox-label' data-value='#:data.id #'>#:data.name #</span>";
autoClose:false,
tagMode:"single",
//tagTemplate:'<span>#: data.values.length # user(s) selected</span>',
filter: "contains",
//placeholder: "Search..",
delay: 200,
close: function(){
var selectedItems =$("#required").data("kendoMultiSelect").dataItems();
if(selectedItems.length !=0)
{
$.each(selectedItems,function(index,obj){
//alert("Name: "+obj.name+"\n"+"Id:"+obj.id+"\n");
CreateUsersFilter(obj.id,obj.name);
});
if (dummyfiltersource.length >= 14)
$(".selectedusersgrid").width("94%");
}
}
});
Hi,
As my title says, when I clear selected values in the input, additional values selected.
See Dojo: https://dojo.telerik.com/UgOVISOL
Duplicate:
1) Open the widget and select an element under the Customer Location group
2) Close the widget
3) Click the X button on the tag to remove the selected Customer Location.
See how it adds an additional value to the selected list. This is somehow linked to the filtering in the change callback because when I remove the change callback, it works fine. N.B. this only happens when clearing the value using the X, if the value is deselected, all is fine
The desired behaviour is that when a customer location is selected, the customer accounts in the datasource are filtered by the selected customer location. This part is working though.
Thanks,
Grant