$("#msUsers").kendoMultiSelect({
placeholder: "Select Users...",
autoClose: false,
dataTextField: "UserName",
dataValueField: "UserId",
virtual: {
itemHeight: 40,
mapValueTo: "dataItem",
valueMapper: function (options) {
var ids = options.value;
if (!ids.length) {
options.success([]);
return;
}
$.ajax({
url: "/Home/GetUserByIds",
traditional: true,
data: { ids: ids },
success: function (response) {
options.success(response.length ? response : []);
},
error: function (xhr) {
console.log("Error:", xhr.responseText);
}
});
}
},
dataSource: {
transport: {
read: {
url: "/Home/BindUsers",
dataType: "json",
data: function (options) {
return {
skip: options.skip,
take: options.take,
filter: options.filter
};
}
},
parameterMap: function (data, action) {
if (action === "read") {
return {
take: data.take,
skip: data.skip,
filter: data.filter?.filters?.[0]?.value || ""
};
}
return data;
}
},
schema: {
data: "Data",
total: "Total"
},
pageSize: 40,
serverPaging: true,
serverFiltering: true
}
});
$("#multiSelect").data("kendoMultiSelect").value([1,2]); //Where [1,2] already exists in the dataSource.
Immediately after setting the value, I attempt to retrieve it, but the result is an empty array [].
I tested this with setInterval(), and for a few milliseconds, the value remains empty before updating correctly.
My code logic requires retrieving the value immediately after setting it and passing it to an API call. However, as mentioned, I receive an empty array.
Is there an event I can listen for before proceeding?
I could use setTimeout(), but that feels like a hack.
kendo.drawing.PDFOptions
I am using this option to download the pdf format of the kendo diagram control. How can I add the language options, to download the PDF in different languages?
/Kumeri.
In my formatting of the grid I set the grid column titles. However when the user groups by the columns the k-group-indicator button uses the same "Title". Is there a way to have the k-group-indicator display a different text? My issue is that it doesn't format as HTML the same as the grid so it displays the html markup "<br/></th>" which is not what I want.
{
field: "ClientName", title: "[[[Client<br/>Name]]]",
template: "#= data.ClientName #",
width: 100,
groupHeaderTemplate: "[[[Client Name]]] ${data.value}",
hideOnGroup: true
},
{
field: "Acct", title: "[[[Account<br/>Number]]]",
template: "#= data.Acct #",
width: 100,
groupHeaderTemplate: "[[[Account Number]]] ${data.value}",
hideOnGroup: true
},
Hi,
AS my title says, how do I add a tooltip to a disabled kendoButton, for the purpose of telling a user why its disabled.
Dojo: https://dojo.telerik.com/OTOpIrOV
Thanks,
Grant
I am using KendoGrid 2025.1.211.
The reorderable property is set like this:
reorderable: {
rows: { clickMoveClick: true }
},
I've been trying to figure a workaround for this problem.
Recently I've discovered that kendo tooltip isn't working on disable buttons.
I've made an example to show you:
http://dojo.telerik.com/EZogO/5
when the tooltip button is enable, kendo's tooltip work fine. But, if you disable the button it will stop working.
The problem is that this doesn't prevent the browser from showing his default tooltip.
Is there any solution?
Thanks in advance.
Is there a way to enable free form movement of the nodes of an org chart, through drag and drop? I thought maybe there would be a way to incorporate the kendoDraggable functionality, but I have not yet gotten it to work. If the nodes were positionable, would the chart be able to handle it and connect them correctly?
Thanks for any help along these lines anyone can offer!
function GetUsers() {
$("#msUsers").kendoMultiSelect({
placeholder: "Select Users...",
autoClose: false,
autoWidth: true,
/* tagMode: "none",*/
dataTextField: "UserName",
dataValueField: "UserId",
virtual: {
itemHeight: 40,
mapValueTo: "dataItem",
valueMapper: function(options) {
var ids = options.value;
if (!ids.length) {
options.success([]);
return;
}
$.ajax({
url: "/Home/GetUserByIds",
traditional: true,
data: {
ids: ids
},
success: function(response) {
if (!response.length) {
options.success([]);
return;
}
options.success(response);
},
error: function(xhr) {
console.log("Error:", xhr.responseText);
}
});
}
},
dataSource: {
transport: {
read: {
url: "/Home/BindUsers",
dataType: "json",
data: function(options) {
return {
skip: options.skip,
take: options.take,
filter: options.filter
}
}
},
parameterMap: function(data, action) {
if (action === "read") {
return {
take: data.take,
skip: data.skip,
filter: data.filter && data.filter.filters && data.filter.filters[0] ?
data.filter.filters[0].value :
"" // Default to empty if no filter is applied
};
} else {
return data;
}
}
},
schema: {
data: "Data",
total: "Total"
},
pageSize: 40,
serverPaging: true,
serverFiltering: true
},
enable: false,
open: function(e) {
debugger;
var multiselect = this;
var selectedValues = multiselect.dataItems(); // Get the selected value objects
if (selectedValues.length) {
var dataSource = multiselect.dataSource;
var currentData = dataSource.view();
const selectedUserIds = new Set(selectedValues.map(selected => selected.UserId));
var remainingUsers = currentData.filter(user =>
user.UserId && !selectedUserIds.has(user.UserId)
);
var sortedData = selectedValues.concat(remainingUsers);
console.log(sortedData);
dataSource.data(sortedData); // THIS BREAKS VIRTUALIZATION!
}
},
height: 400,
});
}