Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DropDownTree TagHelper does not serialize "Value" and "Id" properties when using "bind-to" option #7878

Open
kendo-bot opened this issue Jun 26, 2024 · 0 comments

Comments

@kendo-bot
Copy link
Contributor

kendo-bot commented Jun 26, 2024

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>
  1. 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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants