ComboBox
選択したアイテムをstring
変数に取得する方法を教えてもらえますか?
string selected = cmbbox.SelectedItem.ToString();
MessageBox.Show(selected);
これは私System.Data.DataRowView
の中で私を与えますMessageBox
Try this:
string selected = this.ComboBox.GetItemText(this.ComboBox.SelectedItem);
MessageBox.Show(selected);
Test this
var selected = this.ComboBox.GetItemText(this.ComboBox.SelectedItem);
MessageBox.Show(selected);
SelectedText = this.combobox.SelectionBoxItem.ToString();