Click here to Skip to main content
16,020,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I get textbox data appear in a combo box item since the combo box is displaying a list of my items and the user can choose an item from the list?

What I have tried:

I tried it, but it didn't work. Could you maybe explain how to link the textbox value to the combo box and fill the combo box with the textbox value?
Note :Textbox value is not available in DataList.

var Currentdata=textbox1.text;


<combobox margin="2,2,2,2" fontsize="14" width="160" itemssource="{Binding DataList}" selecteditem="{Binding Currentdata, Mode=TwoWay}" isenabled="{Binding ElementName=IsChangeEnabled,Path=SelectedItem}" isdropdownopen="{Binding IsDropDownOpen,Mode=TwoWay}" selectedvalue="{Binding Path=SelectedData}" displaymemberpath="Currentdata.data">
Posted
Comments
[no name] 24-Aug-22 11:17am    
One typically fills a textblock / textbox from the selected item (Value) in the CB; not the other way around.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900