Completed
Last Updated: 18 Jan 2024 10:15 by ADMIN
Release 2024 Q1

Bug report

DropDownTree is not serialized correctly when declared in the Template component.

Reproduction of the problem

  1. Open the following Telerik REPL.
  2. Notice that the DropDowntTree component declared in the Template for the CustomerRating field is not serialized with its options correctly.

Current behavior

The DropDownTree is not serialized correctly when declared in the Template component.

Expected/desired behavior

The DropDownTree is not serialized correctly when declared in the Template component.

Environment

  • Kendo UI version: 2023.1.1114
  • Browser: [all]
Unplanned
Last Updated: 03 Mar 2023 18:28 by Peter
Created by: Peter
Comments: 0
Category: DropDownTree
Type: Feature Request
1

Is it possible to implement an option that enables the auto-expanding of the parent items while filtering?

This functionality is available in Kendo UI for Angular:

https://www.telerik.com/kendo-angular-ui/components/dropdowns/dropdowntree/filtering/#toc-auto-expanding-items-while-filtering

For example:

  • If you search "steven", the result should contain the parent item "Steven Buchanan" and all of its child items:

Completed
Last Updated: 18 Jan 2024 10:16 by ADMIN
Release 2024 Q1

Bug report

DropDownTree TagHelper throws error when the BindTo configuration is set.

Reproduction of the problem

  1. Open the following Telerik REPL example.
  2. Create mocked DropDownTreeItemBase data that will be populated within the bind-to TagHelper attribute.
  3. Notice the observed error.

Current behavior

Setting the bind-to TagHelper attribute produces the following error

One or more errors occurred. (Object reference not set to an instance of an object.)

Expected/desired behavior

Setting the bind-to should not produce a run-time error.

Environment

  • Kendo UI version: 2023.3.1114
  • Browser: [all]
Completed
Last Updated: 10 Nov 2020 13:46 by ADMIN
Release 2020.R3.SP.next

Bug report

DropDownTreeItemModel does not properly pass its HtmlAttributes members on populating DropDownTree with BindTo()

Reproduction of the problem

In .Net Core application, implement the following view:

@(Html.Kendo().DropDownTree()
    .Name("kendoTreeItems")
    .BindTo((IEnumerable<DropDownTreeItemModel>)ViewBag.Items)
)

and the following controller:

public IActionResult Index()
{
    ViewBag.Items = GetItems();
    return View();
}

public IEnumerable<DropDownTreeItemModel> GetItems()
{
    IDictionary<string, string> attributes = new Dictionary<string, string>
    {
        { "style", "background: red" }
    };

            List<DropDownTreeItemModel> items = new List<DropDownTreeItemModel>
    {
        new DropDownTreeItemModel { Text = "Item 1", HtmlAttributes = attributes },
        new DropDownTreeItemModel { Text = "Item 2", HtmlAttributes = attributes },
        new DropDownTreeItemModel { Text = "Item 3", HtmlAttributes = attributes },
        new DropDownTreeItemModel { Text = "Item 4", HtmlAttributes = attributes },
    };

    return items;
}

Current behavior

The HTML attributes will not be passed to the DropDownTree items.

Expected/desired behavior

The HTML attributes should be passed and present in the DropDownTree items.

Environment

  • Kendo UI version: 2020.1.219
  • Browser: [all]
Completed
Last Updated: 30 Jul 2024 10:46 by ADMIN
Release 2024 Q3 (Aug)

### 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]

Completed
Last Updated: 30 Jul 2024 10:47 by ADMIN
Release 2024 Q3 (Aug)

Bug report

DropDownTreeFor with checkboxes enabled is not binding to model value after postback.

Reproduction of the problem

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"))
                 )
             )
 )

Current behavior

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.

Expected/desired behavior

The DropDownTree should be bound to the model value after successful form submission.

Workaround

Bind the model to a string[] instead of int[].

Environment

  • Kendo UI version: 2024.1.319
Completed
Last Updated: 15 Jul 2024 06:20 by ADMIN
Release 2024 Q3 (Aug)

### Bug report

The DropDownTree TagHelper does not serialize the "Value" and "Id" properties when it is configured for local data binding (using the "bind-to" option).

### Reproduction of the problem

1) Use the following DropDownTree TagHelper configuration:

//Controller
public IActionResult Index()
{
            List<DropDownTreeItemModel> ddtData = new List<DropDownTreeItemModel>()
            {
                new DropDownTreeItemModel() { Id = "1", Text = "Option 1", Value = "S1" },
                new DropDownTreeItemModel() { Id = "2", Text = "Option 2", Value = "S2",
                    Items = new List<DropDownTreeItemModel>()
                    {
                        new DropDownTreeItemModel() { Id = "3", Text = "Option 3", Value = "S3" }
                    }
                }
             };
            ViewBag.StateTreeListData = ddtData;
            return View();
}

// View
<kendo-dropdowntree name="StateLocationDropDownTree" style="width: 100%"
                    height="500px"
                    auto-width="true"
                    bind-to="(IEnumerable<DropDownTreeItemModel>)ViewBag.StateTreeListData">
</kendo-dropdowntree>

2) When the DropDownTree is loaded, inspect its initialization script - the "value" and "id" properties are "null".

### Expected/desired behavior

The "Id" and "Value" properties must be serialized as the rest of the DropDownTreeItemModel properties.

### Environment

* **Telerik UI for ASP.NET Core version: 2024.2.514
* **Browser: [all]