Hi I have a dataGridView In which i have to do one thing
If user click opn any cell then a combo should appear there and user can select any thing from that and after this it should be disable
for this i have done some lines on code.
Dim l_ComboCell As New DataGridViewComboBoxCell
Dim l_rowPosition = dgvReport.CurrentCellAddress.X
Private Sub dgvReport_EditingControlShowing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles dgvReport.EditingControlShowing
Try
editingComboBox =
CType(e.Control, ComboBox)
If Not editingComboBox Is Nothing Then
Catch ex As Exception
'...
End Try
End Sub
Private Sub editingComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim l_strPrimaryKey As String = ""
D
im l_intSelectedIndex As Integer = 0
Try
' MessageBox.Show(editingComboBox.SelectedValue)
'l_strEditedValue = dgvReport.Rows(dgvReport.CurrentCell.RowIndex).Cells(dgvReport.CurrentCell.ColumnIndex).EditedFormattedValue.ToString
'l_intSelectedIndex = editingComboBox.FindString(l_strEditedValue)
'editingComboBox.SelectedIndex = l_intSelectedIndex
R
End Sub My problem is that when i select some thing from this combo box then its selected value is displaying in combo box.
My problem is that when i select some thing from this combo box then its selected value is displaying in combo box.
emoveHandler editingComboBox.SelectedIndexChanged, AddressOf editingComboBox_SelectedIndexChanged Catch ex As Exception End TryEnd IfIf Not editingComboBox.SelectedValue Is Nothing ThenDim l_strEditedValue As String = ""
AddHandler editingComboBox.SelectedIndexChanged, AddressOf editingComboBox_SelectedIndexChanged End If
how can i solve this it menas , suppoese i have seleted a nema then it is displaying the name number aftyer selection