I use the ASP.NET MVC widget code to add a ButtonGroup to a view. The ButtonGroup configuration has 2 buttons, has selection = many, and one of the buttons is selected.
@(Html.Kendo().ButtonGroup()
.Name("select-data-source-filters")
.HtmlAttributes(new { @class = "", @style = "text-align: center; flex-flow: row;"})
.Selection("multiple")
.Items(t =>
{
t.Add().Text("Include Default Product Scenarios").Selected(false).HtmlAttributes(new { @id = "databaseItems", @class= "mb-2 k-ml-2.5" });
t.Add().Text("Include User Defined Product Scenarios").Selected(true).HtmlAttributes(new { @id = "userDefinedItems", @class = "mb-2 ml-2" });
})
)
In an event handler for a different widget (e.g., Grid), I programmatically select the button that is not yet selected. This should cause both buttons to now be selected. However, the act of getting a reference to the button group widget object causes the selection property to be reset to "single". The workaround is to manually reset the selection option to "multiple".
let buttonGroupWidget = $("#select-data-source-filters").kendoButtonGroup().data("kendoButtonGroup");
if (debugLevel > 0) {
console.log(".... buttonGroupWidget = " + buttonGroupWidget + " : ", buttonGroupWidget);
console.log(".... (initial) buttonGroupWidget.selectedIndices = " + buttonGroupWidget.selectedIndices + " : ", buttonGroupWidget.selectedIndices);
}
if (buttonGroupWidget !== null && buttonGroupWidget !== undefined) {
buttonGroupWidget.options.selection = "multiple";//workaround for a bug in 2024Q3 that resets selection to single when get reference to the kendo widget
buttonGroupWidget.select(0);
buttonGroupWidget.trigger("select");
console.log(".... (updated) buttonGroupWidget.selectedIndices = " + buttonGroupWidget.selectedIndices + " : ", buttonGroupWidget.selectedIndices);
}
Currently, the tool name is not added into the HTML structure of the created Editor's tool:
Here is a Dojo example:
https://dojo.telerik.com/AvoNOKOr
Is it possible to include the specified "name" in the button's class, so the custom tools can be selected by class name for further customization?
<div id="grid"></div>
<script>
// The dataSource is initialized as a stand-alone widget that can be bound to the Grid.
var dataSource = new kendo.data.DataSource({
transport: {
read: {
// The remote endpoint from which the data is retrieved.
url: "https://demos.telerik.com/kendo-ui/service/products",
dataType: "jsonp"
}
},
pageSize: 10
});
$("#grid").kendoGrid({
// The dataSource configuration is set to an existing DataSource instance.
dataSource: dataSource,
pageable: true
});
</script>
The breakpoint is added at the last line (326079) of the file.
The breakpoint is added at the desired line (e.g., 3715).
### Bug report
When setting the NoDataTemplate() option to an empty string, the option is not serialized.
### Reproduction of the problem
1. Define an AutoComplete with NoDataTemplate("")
2. Search for a non-existing option and notice how the popup opens and displays the default "No data found" message. When initializing the AutoComplete with jQuery and the "noDataTemplate" is set to "", the popup does not open.
A REPL sample for reproduction: https://netcorerepl.telerik.com/cfkPEClS50FUVU5z00
### Expected/desired behavior
When the NoDataTemplate("") is set and there are no results, the popup must not open. The NoDataTemplate option must work equally when using either the AutoComplete HtmlHelper or Kendo UI for jQuery AutoComplete.
### Environment
* **Telerik UI for ASP.NET MVC version: 2024.4.1112
* **Browser: [all]
The SaveButton() method does not render the Cancel Command button in Grid's Toolbar Template
@(Html.Kendo().Grid<GridModel>()
...
.Name("grid")
.ToolBar(t =>
{
t.Template(@<text>
<span class="group-buttons">
@item.SaveButton();
</span>
</text>);
})
)
The SaveButton() method does not render the Cancel Command in Grid's Toolbar Template.
The SaveButton() method should render the Cancel Command in Grid's Toolbar Template.
A possible way to circumvent this behavior would be to explicitly declare both the Save and Cancel buttons as independent Button components via the Toolbar.ClientTemplate() API configuration.
@(Html.Kendo().Grid<GridModel>()
...
.Name("grid")
.ToolBar(t =>
{
t.ClientTemplate(Html.Kendo().Template()
.AddHtml(@<text>
<span class="group-buttons">
</text>)
.AddComponent(saveBtn => saveBtn
.Button()
.Name("saveBtn")
.Icon("check")
.HtmlAttributes(new { @class = "k-grid-save-changes", style="margin-right: 2%;" })
.Content("Save Changes")
)
.AddComponent(cancelBtn => cancelBtn
.Button()
.Icon("cancel")
.Name("cancelBtn")
.HtmlAttributes(new { @class = "k-grid-cancel-changes" })
.Content("Cancel Changes")
)
.AddHtml("</span>")
);
})
)
In many applications we use passwords. Would love to have a field that allows for the setting of a type to "password" without templates.
.PasswordTextField() or something similar.
Inline Editor removes Toolbar items when it is set as resizable.
true
.The Inline Editor's Toolbar items are removed each time the ToolBar window is re-rendered.
The Inline Editor's Toolbar items should not be removed each time the ToolBar window is re-rendered.
Is it possible to implement a MaxLength() option in the Filterable(f => f.Cell()) configuration that will set the maxlength attribute to the Filter row element in order to limit the length of the string that the user can enter into the Filter row input?
For example:
@(Html.Kendo().Grid(Model)
.Name("grid")
.Columns(columns =>
{
columns.Bound(x => x.Name).Filterable(ftb => ftb.Cell(c => c.MaxLength(5)));
})
...
)
Describe the bug
The k-toolbar-solid class is not rendered in the Grid's toolbar. As a result, the theme background color is not applied to the toolbar.
To reproduce
Steps to reproduce the behavior:
Expected behavior
The k-toolbar-solid class should be applied to the toolbar's div element, as in the Kendo UI for jQuery Grid and the Core Grid.
The workaround is to add the class with jQuery, for example in the DataBound event of the Grid:
<script>
function onGridDataBound(e) {
$(e.sender.wrapper).find(".k-toolbar").addClass("k-toolbar-solid");
}
</script>
Affected browsers (please remove the unneeded items)
Product Version
2024.4.1112
Describe the bug
Setting the Sortable "cursor" option results in inline styles being applied through the _setCursor function in kendo.all.min.js. This causes a CSP related js exception.
To reproduce
<ul id="sortable">
<li>ItemA1</li>
<li>ItemA2</li>
<li>ItemA3</li>
</ul>
<script>
$("#sortable").kendoSortable({
cursor: "move"
});
</script>
Expected behavior
No inline styles should be added, to ensure CSP compatibility.
Actual behavior
A js error related to inline styles is thrown.
Affected browsers (please remove the unneeded items)
Product Version
2024.4.1112
Dojo: https://dojo.telerik.com/iMuMedOd
A js exception is thrown:
Uncaught TypeError: Cannot read property 'click' of undefined
kendo.all.js:168073
With the toolbar disabled the shortcuts should do nothing. There should be no exceptions.
The button does not have an aria-label attribute.
The button has an aria-label attribute.
Workaround:
<script>
$(document).ready(function() {
$(".k-clear-value").attr("aria-label", "Clear");
})
</script>
Hello,
It seams that Milliseconds are missing from ChartAxisLabelsDateFormats and so there is no Milliseconds(string format) in ChartAxisLabelsDateFormatsBuilder.
https://docs.telerik.com/aspnet-mvc/api/kendo.mvc.ui.fluent/chartaxislabelsdateformatsbuilder
This means that to configure it, we have to config it from client js on load
Note: My current version is 2022.2.621 but according to doc it's the same in 2024.3.1015
There is a difference in behavior between the wrappers (MVC and Core) and the Kendo UI for jQuery DateRangePicker. See the following dojo example, which shows initializing the component with a null value for the End date: https://dojo.telerik.com/IkAMUJoG/2
In contrast, the MVC and Core helpers display the Start value as End value.
The End value is the same as the Start value.
The End value is null.
Consider also the scenario, where the Range configuration is not set and the component gets the Start and End values from the model, and the value of the EndDate field is null:
@(Html.Kendo().DateRangePickerFor(m => m.StartDate, m => m.EndDate )
.Name("dateRangePicker")
)
The TabStrip Item Action()
method is not loading content correctly.
@(Html.Kendo().TabStrip() .Name("tabs") .Items(strip => { strip.Add().Text("Back").Action("About", "Home"); // ...
For kendo.version '2024.3.806', when the tab is clicked, the controller method does not load from the Action().
For previous versions, like '2023.2.718', when the tab is clicked, the URL from the action method is loaded into the browser URL.
The Scheduler is not rendered correctly when the Custom Toolbar is declared with a Template component
Open the following demo and notice that the Scheduler has not been rendered accordingly.
The Scheduler is not rendered accordingly.
The Scheduler should be rendered accordingly.
The jQuery dependency is defined as follows in the package .nuspec file:
<dependency id="jQuery" version="(, 3.7.1]" />
This causes the following warning to appear when installing the package in a project:
Telerik.UI.for.AspNet.Mvc5 2024.3.1015 does not provide an inclusive lower bound for dependency jQuery (<= 3.7.1). jQuery 1.4.1 was resolved instead.
The affected packages are:
Telerik.UI.for.AspNet.Mvc5
Telerik.UI.for.AspNet.Mvc5.Trial
Install the Telerik.UI.for.AspNet.Mvc5 package in a project and check the warnings list.
Warning:
Telerik.UI.for.AspNet.Mvc5 2024.3.1015 does not provide an inclusive lower bound for dependency jQuery (<= 3.7.1). jQuery 1.4.1 was resolved instead.
Add a lower bound (https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1604) to resolve the warning about the jQuery dependency.
Dojo example: https://dojo.telerik.com/oDOcanIk
The checked radio button of the RadioGroup appears unchecked.
The RadioGroup check state remains the same.
<div id="pdfViewer">
</div>
<script type="text/javascript">
$("#pdfViewer").kendoPDFViewer({
pdfjsProcessing: {
file: ""
}
});
function loadFile() {
$("#pdfViewer").data("kendoPDFViewer").fromFile("@Url.Action("GetPDF", "Home")");
}
</script>
public ActionResult GetPDF()
{
var name = "sample.pdf";
string path = Server.MapPath("/Content/pdf/sample.pdf");
//generate a random boolean:
Random rng = new Random();
bool randomBool = rng.Next(0, 2) > 0;
if (randomBool)
{
byte[] fileBytes = System.IO.File.ReadAllBytes(path);
return File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, name);
}
else
{
return new HttpNotFoundResult("File not found.");
}
}
In the case where the request returns HttpNotFoundResult, a number of js errors are thrown:
util.js:417 Uncaught (in promise)
The user loses the ability to load a file, because subsequent attempts to load a file by clicking the button result in another js exception:
api.js:1114 Uncaught TypeError: Cannot read properties of null (reading 'sendWithStream')
The component should show a message that a file is not found, without throwing js exceptions and should not become unusable after a failed attempt to load a file.