How to configure hasFocus binding and attr tabindex binding using knockout for ignite control like igeditor ,igcombo etc.
Hello,
Here you can see how to configure knockout for igCombo: http://www.igniteui.com/help/igcombo-knockoutjs-support.
Also here you can see the konckoutJs binding for igCombo: http://www.igniteui.com/combo/bind-combo-with-ko.
Please take a look this two topics. I hope that this topics will explain to you how you can configure your bindings.
I'm looking forward to your reply
I already went through these documents.But I didn't see anything which talks about how to use knockout observable for focus.
this is not working other way(Focus programmatically). I have button on click i want to set focus
SetFocus
like this http://knockoutjs.com/documentation/hasfocus-binding.html
<div class="horizontal-container"> <input id="ig-combo" data-bind="igCombo: { dataSource: data, textKey: 'Name', valueKey: 'ID' }, hasFocus: isSelected" /> </div> <button data-bind="click: setIsSelected">SetFocus</button>
Thank you for your post.
I modified your sample to focus the combo on button click. Only that you had to do is to set onClick event to be on button element.
You can see the attached sample below.
If you have further questions, please feel free to contact us.
Not working for me. See attached
+ attachement
You are welcome. I'm glad to be helpful.
Thanks it works with ko 3.3.
If you need further assistance, please feel free to contact us.
Sorry for my misunderstanding, the sample already works, you can see it. The problem was that in the versions under 3.0 there were a problem with hasFocus data bind.
What you need to do is to change:
this script <script src="http://www.igniteui.com/js/external/knockout-latest.js" type="text/javascript"></script>
with that script: <script src="https://ajax.aspnetcdn.com/ajax/knockout/knockout-3.3.0.js" type="text/javascript"></script>
I attached screen shot i didn't see focus . When i manually focus (i see cursor and drop down color changes ). See attached image of manual focus.