Is there a way to set the current display text and value of a webdropdown in the server-side(code behind vb file)?
Thanks,
Sunil Mehta.
Troy,
I appreciate your patience on understanding the issue but do reply with a solution asap. This is bit urgent.
To add more into it, try adding
Me.WebDropDown2.SelectedItemIndex = 1
in the "WebDropDown2_Load" procedure. So, at page load, webdropdown2 correctly shows text in the texteditor of webdropdown2. But after changing the selection in webdropdown1, when control goes to ItemsRequested procedure, then the item does not showup in the texteditor. I am not able to understand the reason why this is happening.
Hi Troy,
I tried the sample provided by you and I can see the same issue with that sample as well. I replaced the below statement in the 'WebDropDown2_ItemsRequested" procedure
Me.WebDropDown2.TextField = "Fname"
with
and then tried selecting "Item2" in webdropdown1. Below are my findings after doing this:
1. The texteditor of webdropdown was still empty. I was expecting "Ivan" to be in the texteditor as the currentvalue.
2. When I opened webdropdown2, the second item "Ivan" shows highlighted in blue color. It gives a kind of impression that the item has been selected. But why "Ivan" is not getting displayed in the texteditor.
I am attaching the updated sample below. Please check the issue and let me know the solution.
Hi SunilMehta,
The WebDropDown is an ajax control. It will send an async call.
For this issue I recommend updating to the latest service release for NetAdvantage 2012 vol 1. This will update you to 20121.2048. Let me know if after updating you are having the same issue.
If so, the next recommended step will be to update my sample such that it reproduces the issue and send back my modified sample. I will then be able to research this matter further for you.
Thank you SunilMehta. I will look for your update.
Hi,
I feel when "ItemsRequested" event is being called and AJAX request goes to server-side, then AJAX response is not returning to client. Hence, the selected item text is not getting displayed on the text editor of dropdown.
What kind of AJAX call is being generated on "ItemsRequested" event? Is it Async?