Filtering a column bound to a complex object throws a JavaScript error.
This is a regression introduced with v 2023.1.117
Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at x (kendo.all.js:313050:21)
at init._createForm (kendo.all.js:313050:21)
at init._init (kendo.all.js:313050:21)
at init._click (kendo.all.js:313050:21)
at HTMLAnchorElement.dispatch (jquery.min.js:3:12445)
at r.handle (jquery.min.js:3:9174)
JavaScript error is thrown and the filter menu is not generated.
Filtering should work as expected.
The 'footer' attribute in the TagHelpers for both the DatePicker and DateTimePicker does not result in any corresponding markup / Javascript configuration on the page created by the view.
See https://netcorerepl.telerik.com/QxaPwpPt57ypaI4307
The StringExtensions -> ToCamelCase method(part of Kendo.Mvc.Extenstions) doesn't return the expected Camel case result.
Include the Kendo.Mvc.Extenstions namespace. Define the following in a controller:
public IActionResult Index()
{
string test = "RANDOMStatusId";
test = test.ToCamelCase();
return View();
}
Set a debugger and see the value of the "test" variable.
The returned from the ToCamelCase() method value is "rANDOMStatusId"
The expected result returned from the ToCamelCase() method value is "randomStatusId"
### Bug report
The Telerik UI ListBox is not being rendered when the AutoBind() option is specified. Regardless of the value that is put inside the method - be it true/false.
### Reproduction of the problem
1. Set the DataSource option of the ListBox without specifying type such as Ajax/Custom.
2. Set the AutoBind(true) option.
3. Run the application - the page is not rendered at all.
### Expected/desired behavior
The widget should be rendered when the AutoBind is set to true/false.
### TicketID: 1524780
### Possible reason for the behavior
When the Ajax/Custom type of the data source is not specified, the type defaults to null. Hence, there is a boolean property that is checked inside the VerifySettings method of the ListBox.cs file in the source. The IsClientBinding property checks if the widget is bound to a data source, however, since the data source does not have a type, it thinks that the widget is bound to the data via the BindTo option which is incorrect.
Having the AutoBind() property and the BindTo() property enabled, a C# error is thrown inside the VerifySettings() method. However, this error should not be thrown when a data source is specified (even without type).
### Environment
* **Kendo UI version:** 2021.2.616
* **jQuery version:** 1.12.4
* **Browser:** [all]
The TagHelper Grid's TagHelper is not correctly serialized and cannot be used to export hidden columns.
<columns>
<column field="Discontinued" hidden="true">
<exportable enabled="true" />
</column>
</columns>
The Grid TagHelper does not export hidden columns if the exportable TagHelper is enabled identically to the Kendo UI for jQuery Grid column exportable option.
The Grid TagHelper should be able to export hidden columns if the exportable TagHelper is enabled identically to the Kendo UI for jQuery Grid column exportable option.
The relevant attributes are applied to the list item instead of the anchor tag of the Toolbar's dropdown
Both the current and the newly open tab redirect to the link
Only the newly open tab should redirect
The TreeView rendering in UI for ASP.NET MVC and UI for ASP.NET Core are not consistent. Setting the Id
configuration for an item in UI for ASP.NET MVC renders a data-id
attribute, that is missing in UI for ASP.NET Core.
@(Html.Kendo().TreeView()
.Name("treeview-kendo")
.TemplateId("treeview")
.Checkboxes(c=>c.CheckChildren(true))
.Items(treeview =>
{
treeview.Add()
.Text("My Documents")
.Id("MyId1");
treeview.Add()
.Text("My Documents 2")
.Id("MyId2");
})
)
When using the UI for ASP.NET Core the rendered <li>
element does not have the data-id
attribute that is present in UI for ASP.NET MVC
<li role="treeitem" class="k-item k-treeview-item k-first" data-uid="a3c937fd-1c4a-46a6-81e1-e53e1a2aeb6e" aria-checked="false" aria-selected="false" aria-expanded="false" data-expanded="false" aria-setsize="2" aria-level="1">
<div class="k-treeview-top k-treeview-top">
<span class="k-checkbox-wrapper" role="presentation">
<input id="_a3c937fd-1c4a-46a6-81e1-e53e1a2aeb6e" aria-hidden="true" type="checkbox" tabindex="-1" class="k-checkbox k-checkbox-md k-rounded-md">
</span>
<span class="k-treeview-leaf k-in">
<span class="k-treeview-leaf-text">My Documents</span>
</span>
</div>
</li>
Rendering should be consistent and the data-id
attribute added in UI for ASP.NET Core.
Use the HtmlAttributes
configuration to add the data-id
attribute
treeview.Add()
.HtmlAttributes(new {data_id = "MyId1"})
.Text("My Documents")
.Id("MyId1");
The DatePicker TagHelper does not expose the disableDates configuration option.
When using the DatePicker TagHelper it is not possible to set the disableDates configuration.
The disableDates configuration should be configurable similar to the HTML Helpers.
I have a grid where the editor button should not be with text so I added a class to the button like this:
@(Html.Kendo().Grid<...>() .Name("...") .Columns(columns => { columns.Command(command => command.Edit() .Text(" ") .HtmlAttributes(new { @class = "grid-button-notext", title = "..." })); }) .Editable(editable => editable.Mode(GridEditMode.PopUp) .TemplateName("...")) )
but the HtmlAttributes are applied also to the two buttons on the popup editor
<div class="k-edit-buttons k-actions-end">
<button type="button" class="k-grid-update grid-button-notext k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary" title="...">
<span class="k-icon k-i-check k-button-icon"></span>
<span class="k-button-text">Save</span>
</button>
<button type="button" class="k-grid-cancel grid-button-notext k-button k-button-md k-rounded-md k-button-solid k-button-solid-base" title="...">
<span class="k-icon k-i-cancel k-button-icon"></span>
<span class="k-button-text">Cancel</span>
</button>
</div>
Expected behaviour:
the HtmlAttributes to be applied only to the grid button. And if needed to provide PopupButtonHtmlAttributes like you have for column: HtmlAttributes, HeaderAttributes, FooterAttributes
### Bug report
The CheckBox TagHelper does not render the attribute "required" and a custom class.
### Reproduction of the problem
The CheckBox TagHelper definition:
<kendo-checkbox id="KendoCheckboxRequiredByHtml" class="form-check-input" required>
</kendo-checkbox>
It generates the following markup:
<input id="KendoCheckboxRequiredByHtml" name="KendoCheckboxRequiredByHtml" type="checkbox" value="true" data-role="checkbox" class="k-checkbox k-checkbox-md k-rounded-md">
<input name="KendoCheckboxRequiredByHtml" type="hidden" value="false">
A sample for reproduction is attached.
### Expected/desired behavior
The attribute "required" and the class "form-check-input" to be set to the generated input element.
### Environment
* **Kendo UI version: 2022.2.510
* **Browser: [all]
Having a grid with a similar column setup will result in an error.
.Columns(columns =>
{
columns.Bound(p => p.UnitsInStock).HtmlAttributes(new { @class = "#: UnitsInStock == 39 ? 'test' : 'a' #" });
})
Having a grid with a similar column setup should not result in an error.
.Columns(columns =>
{
columns.Bound(p => p.UnitsInStock).HtmlAttributes(new { @class = "#: UnitsInStock == 39 ? 'test' : 'a' #" });
})
When a Telerik UI for ASP.NET Core MultiSelect is used in a Form, a JS error is thrown:
jquery.min.js:2 Uncaught Error: Syntax error, unrecognized expression: #
at Function.se.error (jquery.min.js:2)
at se.tokenize (jquery.min.js:2)
at se.select (jquery.min.js:2)
at Function.se [as find] (jquery.min.js:2)
at S.fn.init.find (jquery.min.js:2)
at new S.fn.init (jquery.min.js:2)
at S (jquery.min.js:2)
at Object.data ((index):24)
at init.setup (kendo.all.js:6596)
at init.read (kendo.all.js:6574)
The issue occurs when using jQuery 3.6.0, but is absent with jQuery v 1.12.4
@(Html.Kendo().Form<FormViewModel>()
.Name("exampleForm")
.HtmlAttributes(new { action = "Items", method = "POST" })
.Validatable(v =>
{
v.ValidateOnBlur(true);
v.ValidationSummary(vs => vs.Enable(true));
})
.Items(items =>
{
items.Add()
.Field(f => f.MultiSelect)
.Label(l => l.Text("MultiSelect:"))
.Editor(e =>
{
e.MultiSelect()
.HtmlAttributes(new { })
.Placeholder("Select...")
.DataTextField("ProductName")
.DataValueField("ProductID")
.HtmlAttributes(new { style = "width:100%" })
.Height(520)
.DataSource(source =>
{
source.Read(read =>
{
read.Action("Items_GetProducts", "Form");
})
.ServerFiltering(true);
});
});
})
)
public class FormViewModel
{
public List<ProductViewModel> MultiSelect { get; set; }
}
Runnable sample available in ticket 1540812
JavaScript error should not be thrown.
When server-side localization is used Filtering is always enabled.
Runnable sample is available in ticket 1580765
The Filterable.Operators automatically configures the messages for the string, number, date and enum operators based on the resx files.
Filtering for the TreeList is always enabled.
Filtering for the TreeList should be configurable irrespective of whether localization is used or not.
After the TreeList is initialized call the setOptions method and disable filtering:
$(document).ready(function(){
var treelist = $("#treelist").getKendoTreeList();
treelist.setOptions({
filterable:false
});
})
### Bug report
When the Grid Column Menu is set to "modern", the ButtonGroup "And"/"Or" in the Filter menu is not translated.
### Reproduction of the problem
1. Create a Grid and enable the ColumMenu with the type "modern".
2. Include the localization script "kendo.messages.de-CH.min.js" and the culture file "kendo.culture.de-CH.min.js".
3. Set the Kendo culture to "de-CH".
4. Open the ColumnMenu of a specified Grid column and then the Filter menu. The messages "And/Or" are not translated. The messages are translated as expected when using the default ColumnMenu.
A Dojo sample for reproduction: https://dojo.telerik.com/UpUmAlIW
### Expected/desired behavior
The Filter menu ButtonGroup should be translated when using the "modern" ColumnMenu.
### Environment
* **Kendo UI version: 2022.3.913
* **jQuery version: 1.12.4
* **Browser: [all]
The DataSource's property groupPaging: true prevents the Grid's group from expanding if it has a defined groupHeaderColumnTemplate.
Also reproducible in the Core wrapper where an error is thrown: kendo.all.js:8743 Uncaught TypeError: Cannot read property 'hasSubgroups' of undefined
groupPaging is not compatible with the groupHeaderColumnTemplate
groupPaging and the groupHeaderColumnTemplate should be compatible
Kendo UI version: 2021.2.616
Browser: [all]
New lines are not removed from the serialized Toolbar.ClientTemplate when multiline content is provided and the Grid is in a DetailTemplate, thus generating an invalid template and causing a Chrome Exception.
The following template configuration is valid and works for the parent grid, but not for child grids:
.ToolBar(toolbar => toolbar.ClientTemplate(@"
<div class='filter'>
<span class='k-textbox k-display-flex auto-filter''>
<input id='search' autocomplete='off' class='k-input' placeholder='Search...' title='Search...' type='text'>
<span class='k-input-icon'><span class='k-icon k-i-search'></span></span>
</span>
</div>
"))
Invalid template is generated
A valid template should be generated
ListView's pager is not rendered as expected when paging is enabled.
The ListView wrapper renders the pager outside the widget's div container contrary to the jQuery initialization of the widget:
The ListView wrapper should render the pager within the widget's div container similar to the jQuery initialization of the widget:
Currently, the ExportAs configuration exposes Proxy method to setup the proxyUrl field, but it is limited to enter only action and controller. Whereas in RazorPages a URL with handler should be defined instead.
Plus, in order for the AntiForgeryToken to work properly it should be injected in the form submitted by the tool.
Link do not appear properly in a TagHelper menu that uses asp-action and asp-controller. In version 2.1 the application crashes
<menu-item text="Furniture">
<sub-items>
<menu-item text="Tables & Chairs" asp-action="About" asp-controller="Home" ></menu-item>
</sub-items>
</menu-item>
Microsoft Tag Helpers should create a working anchor tag