SerciveID
,ServiceName
,IN sql数据库我存储为
id
。我想点击datagridview
组合框将显示名称。
Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
i = DataGridView1.CurrentRow.Index
Me.TextBoxid.Text = DataGridView1.Item(0, i).Value.ToString
Me.TextBoxName.Text = DataGridView1.Item(1, i).Value.ToString
Me.TextBoxSex.Text = DataGridView1.Item(3, i).Value.ToString
Me.TextBoxAge.Text = DataGridView1.Item(2, i).Value.ToString
Me.TextBoxAddress.Text = DataGridView1.Item(4, i).Value.ToString
Me.TextBoxCHiN.Text = DataGridView1.Item(5, i).Value.ToString
Me.TextBoxCHinL.Text = DataGridView1.Item(6, i).Value.ToString
Me.ComboboxService.DisplayMember = DataGridView1.Item(7, i).Value.ToString
Me.TextBoxCHout.Text = DataGridView1.Item(9, i).Value.ToString
Me.TextBoxCHoutL.Text = DataGridView1.Item(8, i).Value.ToString
Me.TextBoxTransfer.Text = DataGridView1.Item(10, i).Value.ToString
Me.ComboBoxPtr.Text = DataGridView1.Item(11, i).Value.ToString
它没有错误,但在ComboboxService中不起作用