### Bug report
The DropDownTree TagHelper with enabled checkboxes does not submit the selected options when it is bound to a Model property.
### Reproduction of the problem
1. Define a DropDownTree TagHelper as a form editor and and enable its checkboxes.
2. Bind the editor to a Model property (an array of integers).
3. Submit the form and examine the submit request payload. The values of the selected items are missing.
//Model
public class TestFormModelClass
{
public int[] MonthsSelectedIds { get; set; }
}
//View
@model TestFormModelClass
<form method="post">
<kendo-dropdowntree for="MonthsSelectedIds"
check-all="true"
datatextfield="Month"
datavaluefield="Id">
<hierarchical-datasource type="DataSourceTagHelperType.Custom">
<schema>
<hierarchical-model id="id"></hierarchical-model>
</schema>
<transport>
<read url="/api/items" />
</transport>
</hierarchical-datasource>
<checkboxes check-children="false" name="CheckedMonths" enabled="true" />
</kendo-dropdowntree>
<button type="submit">Save</button>
</form>
### Expected/desired behavior
When the DropDownTree TagHelper with checkboxes is used as a form editor, the values of the selected items must be submitted as expected to the server.
### Workaround
Use the HtmlHelper version of the DropDownTree
### Environment
* **Telerik UI for ASP.NET Core version: 2024.1.319
* **Browser: [all]
DropDownTreeFor with checkboxes enabled is not binding to model value after postback.
Use the following definition of a DropDownTreeFor HtmlHelper in a plain HTML form, where MySelectedIds is int[]
:
@(Html.Kendo().DropDownTreeFor(m => m.MyClass.MySelectedIds)
.Checkboxes(checkboxes => checkboxes
.CheckChildren(false)
)
.DataTextField("MyText")
.DataValueField("MyId")
.AutoClose(false)
.CheckAll(true)
.DataSource(dataSource => dataSource
.Custom()
.Transport(t => t
.Read(r => r.Url("/api/items"))
)
)
)
The DropDownTree is bound to the model value on page load, but on successful form submission and returning the model the DropDownTree is not bound to the data. Refer to ticket 1648108 for a runnable example.
The DropDownTree should be bound to the model value after successful form submission.
Bind the model to a string[]
instead of int[]
.
When the Columns.Command.Edit.UpdateText property is set to Update
, the text will not be modified and will remain as the default value Save
.
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Command(command => {
command.Edit().UpdateText("Update"); //Will not work
}).Width(250);
})
//....
)
REPL
https://netcorerepl.telerik.com/wIuyvtcO41rAa82G36
The text should change to the specified content within UpdateText.
Set the text via JavaScript using the setOptions method and columns.command.text:
$(document).ready(function(){
var grid = $("#grid").data("kendoGrid");
var options = grid.getOptions();
//set the text for the first command in the last column
// as shown in the second example on:
//https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.command#columnscommandtext
options.columns[4].command[0].text = { edit: "Edit", update: "Update" };
grid.setOptions(options);
});
REPL
https://netcorerepl.telerik.com/wIYeGmOz39LL8mHN26
### Bug report
When adding a new record in an InCell editable Grid with enabled "autoSync" option, it is not rendered in the Grid.
### Reproduction of the problem
A Dojo sample for reproduction: https://dojo.telerik.com/@gdenchev/omotILiP
### Expected/desired behavior
The new record must be visible at the top of the Grid table when the Create operation completes.
The last working version is 2024.1.130.
### Environment
* **Kendo UI version: 2024.1.319
* **jQuery version: 3.7.0
* **Browser: [all]
### Bug report
The ContextMenu does not show when the mouse is moved normally. It will show only when the mouse is moved very slowly.
### Reproduction of the problem
1. Create a Grid with a custom column command.
2. Define a ContextMenu that will be displayed when the custom column command is clicked.
3. Click over a specified column command - the ContextMenu opens.
4. Move the mouse over another row and click the custom column command - the ContextMenu does not open.
A Dojo sample for reproduction: https://dojo.telerik.com/aYiVUzum
### Current behavior
The ContextMenu does not open over every item as expected.
### Expected/desired behavior
The ContextMenu must open when clicking each item.
#### The issue is a regression starting with 2023.1.314 version
### Workaround
Add the following script before the ContextMenu initialization:
<script>
function contains(parent, child) {
try {
return $.contains(parent, child);
} catch (e) {
return false;
}
}
kendo.ui.ContextMenu.fn.open = function (x, y) {
var OPEN = "open",
ACTIVATE = "activate",
DOCUMENT_ELEMENT = $(document.documentElement),
NS = ".kendoMenu";
var that = this;
x = $(x)[0];
if (contains(that.element[0], $(x)[0]) || that._itemHasChildren($(x))) { // call parent open for children elements
kendo.ui.Menu.fn.open.call(that, x);
} else {
if (that._triggerEvent({ item: that.element, type: OPEN }) === false) {
if (that.popup.visible() && that.options.filter) {
that.popup.close(true);
that.popup.element.parent().kendoStop(true);
}
if (!that._triggerFocusOnActivate) {
that._triggerFocusOnActivate = that._focusMenu.bind(that);
}
that.bind(ACTIVATE, that._triggerFocusOnActivate);
if (y !== undefined) {
var overflowWrapper = that._overflowWrapper();
if (overflowWrapper) {
var offset = overflowWrapper.offset();
x -= offset.left;
y -= offset.top;
}
that.popup.wrapper.hide();
that._configurePopupScrolling(x, y);
that.popup.open(x, y);
} else {
that.popup.options.anchor = (x ? x : that.popup.anchor) || that.target;
that.popup.element.parent().kendoStop(true);
that._configurePopupScrolling();
that.popup.open();
}
DOCUMENT_ELEMENT.off(that.popup.downEvent, that.popup._mousedownProxy);
DOCUMENT_ELEMENT
.on(kendo.support.mousedown + NS + that._marker, that._closeProxy);
}
}
return that;
};
</script>
### Environment
* **Kendo UI version: 2023.1.314
* **Browser: [all]
When attributes like Html class are added to the Html element from which the Window widget is initialized these attributes are applied to the Window's .k-window-content element instead of the outermost .k-window. This behavior is inconsistent with other web dev tools like Telerik UI for Blazor and the ThemeBuilder.
Window rendering must be consistent with other Kendo and Telerik suites.
### Bug report
When selecting 31 January as a start date, the navigation to the previous months through the calendar does not work.
### Reproduction of the problem
1. Select 31 January (any year) as a start date.
2. Click the navigation arrows to navigate to the previous months. The previous months navigation stops working.
3. Select any other date as a start date - the previous months navigation works as expected.
A Dojo sample for reproduction: https://dojo.telerik.com/ezoGibIm
### Expected/desired behavior
The user must be able to navigate to the previous months when 31 January is selected in the Start field.
### Environment
* **Kendo UI version: 2024.1.130
* **jQuery version: 3.7.0
* **Browser: [all]
Expose additional API configurations for the Grid's ToolBar
As of recent releases, the Kendo UI Grid Toolbar has been substituted with the Kendo UI Toolbar. This change allows users to add the majority ToolBar.items API options apart from the built-in tools.
As noted within the Kendo UI for jQuery API documentation for the Grid's Toolbar:
"Apart from the built-in tools, the Grid fully exposes the ToolBar.items API. This way you can specify any custom tools in the widget using the components available in the ToolBar itself."
The inherited ToolBar.items API options are not available for the server-side Telerik UI Grid for ASP.NET Core and MVC wrappers as well.
It would be beneficial to the customers if the inherited ToolBar.items API options are available for the server-side Telerik UI Grid for ASP.NET Core and MVC wrappers as well.
### Bug report
The attributes set through the "HtmlAttributes", "ContentHtmlAttributes", and "LinkHtmlAttributes"methods are not applied to the TreeView items.
### Reproduction of the problem
1. Create a TreeView and set attributes by using the "HtmlAttributes", "ContentHtmlAttributes", "LinkHtmlAttributes"methods:
@(Html.Kendo().TreeView()
.Name("treeview-kendo2")
.Items(treeview =>
{
treeview.Add().Text("My Documents")
.SpriteCssClasses("k-icon k-i-globe")
.Expanded(true)
.Url("/")
.HtmlAttributes(new { @class = "fairydust1" })
.ContentHtmlAttributes(new { data_navigate = "navigate_content", @class = "trigger", title = "content_title" })
.LinkHtmlAttributes(new { data_navigate = "navigate_link", @class = "trigger", title = "content_link" });
})
)
2. Run the page and inspect the TreeView item.
### Expected/desired behavior
The attributes are serialized and rendered.
### Environment
* **Kendo UI version: 2021.2.616
* **jQuery version: 1.12.4
* **Browser: [all]
### Bug report
When the deferred scripts are created, the script source points at the root of the application instead of the application's root directory.
### Reproduction of the problem
Enable the global deferred initialization and call the @(Html.Kendo().DeferredScriptFile()) method.
The rendered script tag is: <script src="/kendo-deferred-scripts-XXXX.js"></script>
But it must be: <script src="/MyWebsite/kendo-deferred-scripts-XXXX.js"></script>
### Solution:
If you add a tilde in the Url.Content(), the generated script file must be located as expected:
public HtmlString DeferredScriptFile(string nonce = "")
{
...
var scriptResult= hasDeferredScritps ? $@"<script src=""{urlHelper.Content("~/kendo-deferred-scripts-" + guid + ".js")}"" {(string.IsNullOrEmpty(nonce) ? "" : "nonce=" + '"' + nonce + '"')}></script>" : "";
var styleResult = hasDeferredStyles ? $@"<link href=""{urlHelper.Content("~/kendo-deferred-styles-" + guid + ".css")}"" {(string.IsNullOrEmpty(nonce) ? "" : "nonce=" + '"' + nonce + '"')} rel=""stylesheet""></link>" : "";
return new HtmlString(scriptResult + System.Environment.NewLine + styleResult);
}
### Environment
* **Telerik UI for ASP.NET Core version: 2023.3.1114
* **Browser:** [all]
Similar to #5759. The issue is reproducible with mobile mode and vertical grouping enabled.
Dojo example: https://dojo.telerik.com/enaNotaZ/2
Misalignment between the group cells (e.g., Bob) and the day cells.
Properly aligned cells.
Scheduler Adaptive Rendering in Month View shows wrong year when the selected month is switched from December to January
Next
button to select the next monthThe year doesn't get update properly when the selected Month is switched from December to January
The correct year must be shown in the Scheduler's .k-scheduler-navigation element.
In the Scheduler's Adaptive Rendering mode when the Month view is selected and an event end spans more than a day and ends in 00:00:00 an additional element is rendered for the event.
In the Month View of the Scheduler's when Adaptive Rendering is enabled the events should span the correct amount of days.
When a Date is already present in the DateTimePicker and the date parts are focused with a mouse click the digits for the year part are cut off.
Reproducable in this Dojo.
Screen recording of the issue.
When both UI for ASP.NET MVC and UI for ASP.NET Core Visual Studio extensions are installed and only UI for ASP.NET Core project is loaded, the notification for new version is shown for UI for ASP.NET MVC.
When no datasource is bound, the slot titles and resource group names are not shown, despite being known. After binding to a datasource, they get set immediately. This leads to a glitchy user experience, as there is an empty table with no text whatsoever, as long no databinding is triggeredThe resource descriptions and slot header texts should be set independently from the data binding. The behavior can be observed in the attached example.
Regards, Frieder
The last checkbox selection is not disabled and allows all the columns to be removed if the menu options for the command column are explicitly set to false:
The last checkbox selection should be disabled without allowing all the columns to be removed if the menu options for the command column are explicitly set to false:
The following dojo depicts the aforementioned behavior.
When a TreeView is bound to a new kendo.data.HierarchicalDataSource the binding of the widget breaks.
In the wrappers the following error is thrown:
Uncaught TypeError: Cannot read properties of undefined (reading 'length')
Review the behavior in this Telerik Core REPL.
The TreeView should bind to the new data set successfully.
When a Grid's row is reordered and then the changes are saved - a Destroy request is sent to the server for the dataItem of the reordered row. This happens even though no changes are applied to dataItem of the reordered row.
The Grid should request the reordered item to be perished from the backend.
### Bug report
When pasting a table that contains merged cells from Word to the Editor is not formatted correctly.
### Reproduction of the problem
1) Create an Editor as per the example below:
$("#editor").kendoEditor({
pasteCleanup: {
msAllFormatting: false,
msConvertLists: false,
msTags: false
}
});
2) Copy the table from the attached ".docx" file and paste it into the Editor.
3) The pasted table does not match the table from the Word file.
### Expected/desired behavior
When copying and pasting tables from Word into the Editor, their formatting should match.
### Environment
* **Kendo UI version: 2023.2.718
* **jQuery version: 3.4.1
* **Browser: [all]