I set correctly a value (and stored to database), but when I reopen a card it cannot get a value correctly.
When I try to debug into Action id parameter is not valued.
2 Answers, 1 is accepted
answered on 06 Oct 2020, 12:51 PM
Not sure what you mean by "reopen a card", but I see that your DropDownTree is configured to load items on demand:
This means that child nodes are not loaded initially and will be loaded only after their parent is expanded. So in this scenario, if the value of "NewCustomerCategoryCode" matches the "id" of a node that is not yet loaded, the DropDownTree will have no selected node initially.
Consider removing the .LoadOnDemand option, so that all nodes are loaded initially. In this case if a node's "id" value is equal to the value of the "NewCustomerCategoryCode" field, this node will be selected in the DropDownTree.
As for the "id" parameter in the action, an id is passed only when a parent node is expanded. So for example, if my data contains 1 parent node and 10 child nodes, the action will be called twice: the first time the parent node will be loaded (no id will be sent with the request) and the second request will load the child nodes of the parent node (this time the id of the parent node will be available in the Action).
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.