问题:DataGridView某单元格数据与combobox对应项显示?
解决:
this.combobox1.SelectedIndex = this.combobox1Items.IndexOf(this.DGVPerson[2, this.DGVPerson.CurrentCell.RowIndex].Value.ToString());
本文介绍了一种在C#应用程序中实现DataGridView单元格数据与ComboBox对应项显示的方法。通过设置ComboBox的SelectedIndex属性,使其值等于DataGridView指定单元格值在ComboBox项列表中的索引,实现了两者数据的同步。
问题:DataGridView某单元格数据与combobox对应项显示?
解决:
this.combobox1.SelectedIndex = this.combobox1Items.IndexOf(this.DGVPerson[2, this.DGVPerson.CurrentCell.RowIndex].Value.ToString());
转载于:https://www.cnblogs.com/Delzl/archive/2011/07/03/2096784.html
2748

被折叠的 条评论
为什么被折叠?