Similar to the Cascading WebDropDown value
http://samples.infragistics.com/2010.1/WebFeatureBrowser/Default.aspx
How do you set a textbox value after the user selects a value of a dropdown (without doing a postback)
I have a list of usernames in a dropdownlist. When a name is selected I want to fire a server side event to lookup the phonebook from an arraylist depending on name selected and return that phone number to a WebTextEditor (or textbox)
On the cascading sample there is javascript
combo2.loadItems(eventArgs.getNewSelection()[0].get_text());
that calls the server side event
WebDropDown2.ItemsRequested +=
new DropDownItemsRequestedEventHandler
(WebDropDown2_ItemsRequested);
var text1 = $find('<%= WebTextEditor1.ClientID %>');
text1.set_text(???????????)
Hi,
I am not sure i understand the scenario completely, but in order to set the current text in the dropdown on the client-side you can do the following:
var dropDown = $find('<%= WebDropDown1.ClientID %>');
dropDown.set_currentValue('some value in the input', true);
Usually, if you select an item, the input value should get updated automatically.
Let me know if that helps
Thanks, Angel
I want to set the value of the textbox from a value in the code behind page (which is generated after the dropdown is changed.)
1. Dropdown changed
2. Grab a value from the codebehind page.
3. Change textbox value (without postback)