Hi all.
i have webdropdown search and loadondemand.
when the search results are just one item. I want the item to be selected.
I've tried checking in DropDownClosing event. If there are 2 items (including blank item), the item second to be selected
but i can't get list item in this event or can't get value this item.
Please see demo behind and help me.
Thanks!
Hi Hristo, It worked out great. Thanks for your help ^^!!!
Hello Nguyen,
Please leave the return at line 63 and set the AutoSelectOnMatch property of the WebDropDown to false like this:
AutoSelectOnMatch="False"
Now you should be able to select blank item and if you do not the second item will be selected when there are two items in the list.
Please test it and let me know if it meets your requirements now. If you have any further questions, please do not hesitate to contact me, I will be glad to help.
Hi Hristo. Thank you for your answers
if i don't put return on line 63, i don't select blank item.
i want when i select blank item, the function must be stopped without regard to search results( the items in the dropdown) are two or more than two
Please help me fix that. Thank you!
Thank you for your sample. I reviewed and noticed that you have placed return; on line 63 - when this line executes your function stops here and below code does not execute. I have removed this line and now it works as expected. Please review the sample I have attached - I have only put this line in comment, everything else is the same.
I have also included comment to line 65 - please have a look.
I hope this helps.
Hi Hristo
Thank you for your answers.
i has fixed my code. it's work very good. thank you very much :)
I wanted to ask a little more:
when i enter "123_" on dropdown. search results have 2 item (blank and 123_guarantor)
click out dropdown, the item "123_guarantor" must be selected.
my program run not ok with first.
Please see new demo behind and help me fix that