Skip to content

DropDownTree is not getting model values when it is bound with DataSource #5684

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

Closed
zdravkov opened this issue Mar 25, 2020 · 4 comments
Closed
Assignees
Labels
Bug C: DropDownTree FP: Completed Sync status with associated Feedback Item jQuery
Milestone

Comments

@zdravkov
Copy link
Member

Bug report

Reproduction of the problem

When we use DropDownTreeFor and bind the DropDownTree with DataSource the values are not applied

project available in ticket: 1458580

Environment

  • **Kendo UI version:**2020.1.219
@IvanDanchev
Copy link
Contributor

In addition to the DataSource remote binding scenario, the model is not properly updated when server binding is used:

@(Html.Kendo().DropDownTreeFor(m => m.ListOfRoles)
    .Checkboxes(c => c.Name("checkedItems"))
    .CheckAll(false)
    .AutoClose(false)
    .BindTo((IEnumerable<ServerCheckboxes.Models.ItemViewModel>)ViewBag.dropdowntreeData, (NavigationBindingFactory<DropDownTreeItem> mappings) =>
    {
        mappings.For<ServerCheckboxes.Models.ItemViewModel>(binding => binding.ItemDataBound((item, category) =>
        {
            item.Text = category.Role;
            item.Value = category.RoleID;
        })
        );
    })
    .Events(e => e.DataBound("onDataBound"))
)

A sample project can be found in Ticket ID: 1465800

@IvanDanchev
Copy link
Contributor

Update (Ticket ID: 1465800): using a primitive value in the DDT:

.ValuePrimitive(true)

resolves the issue related to updating the model. So the behavior should be investigated in regards to not using primitive value.

@mihaela-lukanova
Copy link

Reported in 1564121

@yanisslav
Copy link

Reported in 1564199

@aleksandarevangelatov aleksandarevangelatov self-assigned this Feb 2, 2024
@Dimitar-Goshev Dimitar-Goshev added this to the 2024 Q2 milestone Feb 27, 2024
@github-actions github-actions bot added FP: Completed Sync status with associated Feedback Item and removed FP: Unplanned Sync status with associated Feedback Item labels Feb 27, 2024
@Dimitar-Goshev Dimitar-Goshev added FP: Unplanned Sync status with associated Feedback Item jQuery FP: Completed Sync status with associated Feedback Item and removed S: Wrappers (ASP.NET Core) FP: Completed Sync status with associated Feedback Item FP: Unplanned Sync status with associated Feedback Item labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug C: DropDownTree FP: Completed Sync status with associated Feedback Item jQuery
Projects
None yet
Development

No branches or pull requests

9 participants