How do we get the selected value from a combo box using an observable binding?
We noticed that there isn't a method of obtaining the value or selected value. But there is a property for selected items. I see in the example on Ignite UI that they use a view model method to find the actor internally. Is this the only way of getting the selected value?
What if our arrays contain thousands of records? Do we have to loop through all records to find our match?
Hi, Chad.
I understand you could prefer to share more details privately, so I have created a private case CAS-153831-H5C2L5. We could continue our discussion via the case. You could find details for your current support activity at: https://es.infragistics.com/my-account/support-activity
Best regards,
Nikolay Alipiev
Thanks, I read your blog link.
I have a few comments.
First, I'd like to know how I can subscribe to changes like this because they are drastically affecting my productivity, wasting my time reading documentation that is no longer valid.
Second, the fiddle you updated with the selectedItems property usage simply does not work. Give it a shot (click your fiddle link above), when it loads, the combo should match what is in the text.
Third, I understand the intended changes and they make perfect sense (using selectedItems instead of value to be able to support the multi-selection). However, looking at the code in this blog, I became curious to see it in action and I cannot get it to work. Once I moved the code into a fiddle and got it to run, I did notice that the combo did preselect the index 1 as set in code (something that your fiddle mentioned previously did not do). I am not sure what the difference is between the two, but perhaps you can get the first one to work and we'll get an idea of what is going on. Further, in the "igcomboselectionchanging" handler, ui.items[0].data() is not an observable, and the code fails. Calling ui.items[0].data.name() would work, but selectingItems is undefined (I think that was the exception; assuming because you've used the "use strict" directive).
It would really be nice in both cases if you could provide a working example.
Here's the fiddle that I created from the code in the blog: http://jsfiddle.net/1r2kg1ga/11/
Hi, TRE.
First thank you for using our product and I hope that I will be able to help you, with the information that follows.
There were some changed introduced, with one of our service releases. And because our help is updated once per release, the help is not up to date. That's why we've created a blog about this. You can read the information that is needed here. Basically the 'value' option is removed and and 'selectedItems' is added. You can read in the blog about this change. Basically using the 'value' wasn't the best approach of observing the selected value, knowing that observing the selected items is the much more intuitive.
I've also updated you sample jsfiddle.net/.../, to use the latest changes. I'm not exactly sure what you want to achieve, but if you want further assistance on you sample, you can discuss it.
Sorry for the inconvenience, but this change was needed in order to improve the quality and the usage of this knockout extension. And just one information in advance: with our new 15.1 release, our igCombo control is rewritten, and because of the same reason - ease of use and better design. We also needed to adapt the knockout extension to meet new igCombo requirements. So the design is closer to the design of the knockout extension explained in the blog above. So if you plan to use our new version, this month it will be available and the documentation will be updated too.
To your last question: are the enableTextChangedUpdate and enableSelectionChangedUpdate exist only in the extension - the answer is yes. You can use, as a reference, the following topic, where this is described.
I will wait for you feedback.
Can you tell us which build number this is supposed to work in?
I just downloaded this product 2/19/2015. It is version 14.2.20142.2140
Also, I modified the fiddle example that you provided for igCombo/Knockout:
jsfiddle.net/.../ And it does not appear to be working. Notice the text link is working fine, the combo is not linking the value property.
Either I don't have the version that contains this fix (and neither does your hosted files for the sample), or I'm doing it wrong.
Also, enableTextChangedUpdate and enableSelectionChangedUpdate does not exist in your api. Is it specific to the knockout extension?
Please provide answers.
The documentation for this does not appear to be updated.
Does this work for multiple selection combo? I only get one value through.