Binding Combobox text to textbox
-
Hi, \ I have two winform classes in question. One has a combobox. When the use picks a selection, it should display this text in the new class. I ahve this working from combobox to combobox and checkedlistbox to textbox but can't figure out combobox to textbox. Please note that the text in the combobox is a concatenated sql string from two columns, Firstname + Lastname as Fullname. I tried putting Firstname in the constructor and also lastname. In the first form I have used private void updatebutton2_Click(object sender, EventArgs e) { UpdateRole updateRole = new UpdateRole(Convert.ToInt32 (rolecomboBox.SelectedText)); updateRole.Show(); } The second one I have said public UpdateEmp(string Fullname) { this.Fullname = Fullname; InitializeComponent(); } public string Fullname; private void UpdateEmp_Load(object sender, EventArgs e) { this.FirstnameText.SelectedText = Fullname; } } Thanks. Cant figure it out.