Hi,
I'm trying to "miss-use" a Kendo-Multiselect to order some items by order of selection. Meaning I order the select-items in the current order before initializing the Multi-Select and when some items are changed I would like to re-order them according to the current order in the multi-select.
Is there an easy way to achieve that?
I already saw HERE how to get the items via JS (in the correct order), but bevor I start using some custom JS to update the select I would like to ask if there is an easier solution?
Or is there even a more suitable control available? I have <10 items where the user should be able to define the order of all selected items (so it is selection and order, e.g. out of 1,2,3,4,5 the user can e.g. choose 3,2,4 or 3,4,2).
regards,
Christoph
I have a grid that I'm trying to enable inline editing. Whenever I attempt to update a row error is thrown in the console. I've tried moving the editor into a separate editor with no luck. I removed the configuration column so there was just the Room displayName and the same thing happens so it is not an issue with the Multi-Select.
I am currently using Kendo UI v2021.1.330
In Chrome the error happens when the edit control loses focus and is
kendo.all.js:6566 Uncaught TypeError: Cannot read properties of undefined (reading 'data')
at init.setup (kendo.all.js:6566:106)
at init.create (kendo.all.js:6540:34)
at Object.<anonymous> (kendo.all.js:7640:42)
at Function.Deferred (jquery.min.js:2:29289)
at init._promise (kendo.all.js:7637:26)
at init._send (kendo.all.js:7663:44)
at init.sync (kendo.all.js:7395:60)
at init._change (kendo.all.js:8041:26)
at init.d (jquery.min.js:2:3873)
at init.trigger (kendo.all.js:164:37)
In Firefox the error happens when clicking update and is
function generateTemplate(configs) :string{
var arryDisplayNames = configs.map(function (a) { return a.displayName; });
var result = arryDisplayNames.join(", ");
return result;
}
let configurationDataSource = new kendo.data.DataSource({
serverFiltering: true,
transport: {
read: {
url: '/api/config',
data: function (opt) {
return {
roomId: 0
}
}
},
},
schema: {
model: {
id: "id",
fields: {
//id: { type: "number" },
displayName: { type: "string"}
}
}
}
})
let gridDataSource: kendo.data.DataSource = new kendo.data.DataSource({
autoSync: true,
transport: {
read: {
url: '/api/rooms/',
type: 'get',
dataType: 'json',
data: {
buildingid: roomBuildingId
}
},
update: {
url: '/api/rooms/',
type: 'post',
dataType: 'json'
}
},
schema: {
model: {
id: "RoomId",
fields: {
roomId: { type: 'number' },
buildingId: { type: 'number' },
displayName: { type: 'string' },
restricted: { type: 'boolean' },
isActive: { type: 'boolean' },
configurations: { type: 'object' },
owners: { type: 'object' },
}
}
}
});
let gridColumns: kendo.ui.GridColumn[] = [
{ field: "displayName", title: "Room" },
{
field: "configurations",
title: "Configurations",
editor: function (container,options) {
var input = $("<input name='Configurations' id='Configurations' >");
// append to the editor container
input.appendTo(container);
// initialize a multiselect
input.kendoMultiSelect({
dataTextField: "displayName",
dataValueField: "id",
dataSource: configurationDataSource // bind it to the brands array
}).appendTo(container);
},
template: "#= generateTemplate(configurations) #"
},
{ command: ["edit"], title: " "}
];
roomGrid = $('#rooms').kendoGrid({
dataSource: gridDataSource,
sortable: true,
groupable: true,
pageable: false,
editable: "inline",
selectable: "row",
columns: gridColumns
}).data('kendoGrid') as kendo.ui.Grid
Hi!
I'm trying to create an email input control. Something similar to how gmail works, where you can type and get autocompletion and where the email is converted to a "chip" that have an "x" on the right for removing. The multiselect already looks very close to what I need to achieve, but I need to be able to enter freeform convert to chip on enter or after a comma is added.
I realize that the multiselect is not designed that way, and freeform text is not really compatible with multiselect.
So the question I have is... Is there a way to use some of the building blocks of the multiselect to achieve a similar result?
I need to create a custom control to convert a freeform "John Doe <jd@example.com>" To a chip that just displays the name.
Again, I understand I will need to write the bulk of the logic to support this behavior, but I don't see a "chip" control like the angular counterpart has. Maybe I'm missing something.
Cheers
Hi, we need to use mutlSelect with huge dataset, 10k+.
We found a solution that seems to partially work, we just set a pageSize on the dataset, and it works almost perfectly.
https://dojo.telerik.com/@foxontherock/aJeWapAV/6
The DOM stay low, and we can select items outside the first page, and it works well, the items stays on the list of selected items.
The only issue seems to set "initial" values. If these values are not on the first page, they are not displayed and set.
I tried using the "value" parameter, and the .value method.
But, I know it's possible to make it work, because, after, when I select my items in the list, it's perfect.
Is it a bug, or do you have any suggestion to help me set the intial items?
Thank you.
p.s. I DONT want to use virtual property, I tried it and it's difficult to use and doesn't work as expected.
I want to load positions based on selected employee.
Index.Cshtml
$("#employees").kendoMultiSelect({
placeholder: "Select employees...",
dataTextField: "EmployeeFullName",
dataValueField: "EmployeeId",
autoBind: false,
filter: "contains",
dataSource: {
serverFiltering: true,
transport: {
read: baseUrl + "Schedules/GetEmployees_New",
}
}
}).data('kendoMultiSelect');
$("#positions").kendoMultiSelect({
placeholder: "Select positions...",
dataTextField: "Code",
dataValueField: "PositionId",
autoBind: false,
filter: "contains",
dataSource: {
serverFiltering: true,
transport: {
read: baseUrl + "Schedules/GetPositions_New",
data: function () {
return {
IDs : $("#employees").data('kendoMultiSelect').value().join() //I am not getting this value in controller
};
}
}
}
}).data('kendoMultiSelect');
SchedulesController.cs
public ActionResult GetEmployees_New(Filters filter, string IDs)
{
return Json(ReturnData, JsonRequestBehavior.AllowGet);
}
public ActionResult GetPositions_New(Filters filter, string IDs)
{
// I am not getting employee value in IDs parameter.
return Json(ReturnData, JsonRequestBehavior.AllowGet);
}
Model
public class Filters
{
public string logic { get; set; }
public DateTime? FromDate { get; set; }
public DateTime? ToDate { get; set; }
public List<Filter> filters { get; set; }
public bool IsDailyHours { get; set; }
}
Go here: https://demos.telerik.com/kendo-ui/multiselect/index
and select Anne King, Andrew Fuller and Nancy Leverling.
MultiSelect now uses two lines and the second line is blank, even after the widget loses focus.
How can I get rid of this extra blank line?
My page has lots of stuff on it, and the extra line causes most of the page to shift down.
Scroll of Dropdown tree is not working when navigate through keyboard's down arrow.
We have similar implementation like below link. and in the provided link scroll bar is also not working when we navigate trough keyboard.
Link: https://dojo.telerik.com/oVoboJeq
Please let us know solution/workaround for it.
Thanks!!
I need to use two MultiSelect widgets side by side and only one will render. The second <select> element just gets completely omitted from the DOM. There are no javascript errors and both widgets are getting initialized. The second one just doesn't show up. I was unable to replicate the issue with a simple working example but I have included my HTML, the HTML that gets rendered, and my javascript for initializing the widgets. Thanks in advance for any help.
My HTML:
<div id="scheduleToolContainer" class="wrapper">
<div class="notificationPrompt"></div>
<div id="scheduleToolContent">
<button id="btnPrevDate" type="button" class="btn btn-light border"><i class="fas fa-arrow-left"></i></button>
<input id="scheduleDatePicker" title="datepicker" />
<button id="btnNextDate" type="button" class="btn btn-light border"><i class="fas fa-arrow-right"></i></button>
<select id="ddAttendingProvider" style="width:250px" data-target-url="@Url.Action("GetAttendingProviders", "ScheduleTool", new { area = "PatientLists" })" />
<select id="ddInsurance" style="width:250px" data-target-url="@Url.Action("GetInsuranceList", "ScheduleTool", new { area = "PatientLists" })" />
<button id="btnViewSchedule" class="btn btn-primary">Apply</button>
<div id="scheduleGrid" class="mt-2 rounded" data-schedule-url="@Url.Action("GetScheduleItems", "ScheduleTool", new { area = "PatientLists" })"></div>
</div>
<button id="btnPrintEncounters" class="btn btn-light border mt-2" data-target-url="@Url.Action("PrintSelectedEncounters", "ScheduleTool", new { area = "PatientLists" })"><i class="fas fa-file-medical-alt fa-2x"></i></button>
<div id="gridLoadingSpinner" class="text-center text-secondary"><i class="fas fa-spinner fa-spin fa-3x"></i></div>
</div>
HTML in the DOM:
Javascript (get's called when the page loads):
function loadFilters() {
$("#ddAttendingProvider").kendoMultiSelect({
placeholder: 'All',
dataSource: {
transport: {
read: {
url: attProvidersUrl,
type: "POST",
data: function () {
return {
filter: Filters.toRequestFilter(),
date: $('#scheduleDatePicker').val()
}
}
}
}
}
});
$("#ddInsurance").kendoMultiSelect({
placeholder: 'All',
dataSource: {
transport: {
read: {
type: "POST",
url: insuranceListUrl,
data: function () {
return {
filter: Filters.toRequestFilter(),
date: $('#scheduleDatePicker').val()
}
}
}
}
}
});
}
We have a use case where users are choosing which values they'd like to concatenate together, from a list of options.
At times, they may need to concatenate the same thing more than once
Kendo's multiselect seems like the best component for this
... but I'm getting stuck on customizing it's behavior to allow the same value to repeat, when CTRL + CLICK takes place.
Things are very close to working, but am unable to get the MultiSelect to dynamically update its value correctly, using Kendo's value() method.
Offending line of code attached in screenshot
and sample Dojo here -> https://dojo.telerik.com/ELeligEY/14
Am I missing something w/ Kendo's API? Should I be approaching this with a different Kendo component?
UPDATE: from scrounging the forums, it appears an underlying architectural design means MultiSelect inherits from something that does not allow repeating values? https://www.telerik.com/forums/allow-duplicate-items
Help with this feature request would be much appreciated.
https://feedback.telerik.com/kendo-jquery-ui/1359475-allow-select-items-in-multiselect-multiple-times
Or guidance on how one might customize the Kendo Multiselect to achieve this kind of use case.
Help much appreciated.