7 Answers, 1 is accepted
0
Hello,
In order to set a value to the MultiSelect widget when complex data is used, you need to provide a valid dataValueField configuration, this way the widget will know how to match the value set via the value() method and the corresponding dataItem of the dataSource.
Regards,
Kiril Nikolov
Telerik by Progress
In order to set a value to the MultiSelect widget when complex data is used, you need to provide a valid dataValueField configuration, this way the widget will know how to match the value set via the value() method and the corresponding dataItem of the dataSource.
Regards,
Kiril Nikolov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0
Matt
Top achievements
Rank 1
answered on 03 Jan 2017, 02:40 PM
What dataValueField configuration if I want to bind to the entire this object? I would like the .value() method to return the entire dataItem since I need multiple values from it.
0
Hello,
The valueField should be set to a field of your data. See the updated sample:
http://dojo.telerik.com/aZUXi/3
Regards,
Kiril Nikolov
Telerik by Progress
The valueField should be set to a field of your data. See the updated sample:
http://dojo.telerik.com/aZUXi/3
Regards,
Kiril Nikolov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0
Matt
Top achievements
Rank 1
answered on 04 Jan 2017, 09:43 PM
If I set the data value field I do not get the data I need.
I created a new example, much closer to what I am doing. http://dojo.telerik.com/agATe
If you visit that link and add The Dark Night to the list, a warning will pop up. I'd also like the user to add custom items to that multi select but if they are added then the warning will also popup. This is almost working - if you type a movie not in the list ('test') then you will see the custom no data template. Clicking the button does add the item to the data source but does not select it. The user has to open the multi select again, select the new custom item again, and then it will persist and the warning message show.
Thank you.0
Accepted
Hello,
You need to add the item to the source first. See his:
http://dojo.telerik.com/agATe/5
Regards,
Kiril Nikolov
Telerik by Progress
You need to add the item to the source first. See his:
http://dojo.telerik.com/agATe/5
Regards,
Kiril Nikolov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0
Matt
Top achievements
Rank 1
answered on 05 Jan 2017, 02:01 PM
That worked! To recap, the order was important (push to the data source collection, update the data source with the multiselect, then push to the selected values collection), and the dataValueField was required like you mentioned, and obviously valuePrimitive remains false.
0
Hello,
Happy to help.
In case you have any further questions - do not hesitate to contact us.
Regards,
Kiril Nikolov
Telerik by Progress
Happy to help.
In case you have any further questions - do not hesitate to contact us.
Regards,
Kiril Nikolov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.