Telerik Forums
Kendo UI for jQuery Forum
0 answers
99 views

When using the MVVM value binding with the DropDownTree, pressing the X button to clear the selection does not clear the bound field in the viewmodel.  If the DropDownTree is configured with valuePrimitive=true, then the VM bound field is completely unchanged  If the DropDownTree is configured with valuePrimitive=false, then the VM bound field is set to the string value of the prior selection's ID.

So my present workaround is to use valuePrimitive=false and if the VM bound field ends up being a string instead of an object, then treat it as null instead.  This adds a bunch of extra and ugly code to my app - is there any way to get the widget to simply set the bound VM field to null when the user clicks the X?

Bill
Top achievements
Rank 1
 updated question on 25 Nov 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?