DropDownTreeFor with checkboxes enabled is not binding to model value after postback. #7807
Labels
Bug
C: DropDownTree
FP: Unplanned
Sync status with associated Feedback Item
S: Wrappers (ASP.NET Core)
S: Wrappers (ASP.NET MVC)
SEV: Medium
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[]
: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 ofint[]
.Environment
The text was updated successfully, but these errors were encountered: