HI,
I have the following code :
I have the following code :
<
select
id
=
"mlstProdTypes"
multiple
data-bind
=
"source: prodTypesList, value: filter.prodTypes"
data-text-field
=
"name"
data-value-field
=
"id"
class
=
"prodTypesList"
></
select
>
filter.prodTypes is defined as []. Even though I have specified data-value-field, selectedItem { name: "", id: "" } added to filter.prodTypes instead of adding only the "id"
Please help how to get back only the selected item's data-value-field instead of the selected item ....
Thanks
Aparna
5 Answers, 1 is accepted
0
Hi Aparna,
data-value-field and data-text-field are properties of the Kendo widgets and cannot be used with standard html elements. The html element bindings are demonstrated here.
Regards,
Alexander Valchev
the Telerik team
data-value-field and data-text-field are properties of the Kendo widgets and cannot be used with standard html elements. The html element bindings are demonstrated here.
Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Aparna
Top achievements
Rank 1
answered on 23 Oct 2012, 04:11 PM
Hi Valchev
Thanks for responding. So is there no way to specify display property and value property incase of HTML bindings ? Note in my example, only Name is getting displayed but for value, instead of storing a specific property entire selected object is getting stored ....
Thanks
Aparna
Thanks for responding. So is there no way to specify display property and value property incase of HTML bindings ? Note in my example, only Name is getting displayed but for value, instead of storing a specific property entire selected object is getting stored ....
Thanks
Aparna
0
Hi Aparna,
I made a mistake, please accept my apology for the inconvenience caused.
Actually the data-text-field and data-value-field are supposed to work with <select> elements. Here is a short example that demonstrates the implementation of such scenario:
The values will be still stored as objects, but you can retrieve the value (or text) field through a function.
Regards,
Alexander Valchev
the Telerik team
I made a mistake, please accept my apology for the inconvenience caused.
Actually the data-text-field and data-value-field are supposed to work with <select> elements. Here is a short example that demonstrates the implementation of such scenario:
The values will be still stored as objects, but you can retrieve the value (or text) field through a function.
Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Hardeep
Top achievements
Rank 1
answered on 27 Sep 2013, 04:30 PM
Hi Alexander,
Is it possible to multiple selection with single click without holding ctrl key?
E.g. Click on it select it..then click on second item and select it without loosing first selection?
Thank you.
Best Regards
Is it possible to multiple selection with single click without holding ctrl key?
E.g. Click on it select it..then click on second item and select it without loosing first selection?
Thank you.
Best Regards
0
Hello Hardeep,
Kendo MVVM does not modify the way standard select multiple HTML element behaves. By default multiple selection is performed by holding the ctrl key:
Regards,
Alexander Valchev
Telerik
Kendo MVVM does not modify the way standard select multiple HTML element behaves. By default multiple selection is performed by holding the ctrl key:
Changing the native behavior is not supported.
Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!