Hi,
I'm not sure if I should put this here or in the WebDataTree section.
Anyway, I have this web user control that implements a WebDropDown with a WebDataTree inside.
I need it to behave as close as possible to a normal dropdown, so if I set the focus to the dropdown and press the arrow keys in the keyboard I should be able to navigate through the items of the tree. The navigation inside the tree works ok (kind of, I have another question open regarding the scroll of the dropdown), but I need to set the focus to the tree when pressing the arrows in the dropdown.
I have attached a small demo project.
Thanks in advance.
Hi, I finally managed to do with this in the inputKeyUp client event of the DropDown
function setFocus(sender, args) { var key = args._props[0].keyCode; if(key >= 37 && key <= 40) { sender.openDropDown(); setTimeout(function() { $('#' + sender._id + ' input._tree_f_e_').first().focus(); }, 200); } }
Thanks anyway.
Hello Carlos,
Thank you for posting in our forums!
I am glad to hear you were able to resolve this and thank you for sharing your solution.
If you need anything else, please let me know and I will be glad to help.