Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个dataset连接到一个在win32bindinglist中连接到一个的。combobox
dataset
bindinglist
combobox
当我有一个值为“Computer”的私有字符串时,我想让“Computer”被选为一个displaymember。combobox
displaymember
主要问题是它无法用于SelectedText选择combobox“计算机”,但当我使用selectedIndex. 但是,为了使用selectedIndex,您必须知道表格中的行号才能使文本被选中。
SelectedText
selectedIndex
(由于标签不确定,我假设您正在为您的应用程序使用 WinForms)。
尝试以下操作:
combobox.SelectedValue = "Computer";