M
Mike
I have a custom datagridcolumnstyle that hosts a combobox. If I tab into
this cell it skips over into the next cell. If I arrow into the cell, it
does not skip over.
This only happens when I attempt to set the focus on the combobox, as in the
following:
Protected Overloads Overrides Sub Edit(ByVal [source] As
CurrencyManager, ByVal rowNum As Integer, ByVal bounds As Rectangle, _
ByVal [readOnly] As Boolean, ByVal instantText As String, ByVal
cellIsVisible As Boolean)
Try
If cellIsVisible Then
MyComboBox.Bounds = New Rectangle(bounds.X + 2, bounds.Y +
2, bounds.Width - 4, bounds.Height - 4)
MyComboBox.Show()
MyComboBox.Focus()
Else
MyComboBox.Hide()
End If
Catch ex As Exception
Throw ex
End Try
End Sub
If I comment out the line MyComboBox.Focus() then tabbing into the cell does
not skip to the next cell. However, the combobox does not have the focus,
requiring the user to click into the combobox.
Does anyone know why this is happening?
Thanks,
Mike
this cell it skips over into the next cell. If I arrow into the cell, it
does not skip over.
This only happens when I attempt to set the focus on the combobox, as in the
following:
Protected Overloads Overrides Sub Edit(ByVal [source] As
CurrencyManager, ByVal rowNum As Integer, ByVal bounds As Rectangle, _
ByVal [readOnly] As Boolean, ByVal instantText As String, ByVal
cellIsVisible As Boolean)
Try
If cellIsVisible Then
MyComboBox.Bounds = New Rectangle(bounds.X + 2, bounds.Y +
2, bounds.Width - 4, bounds.Height - 4)
MyComboBox.Show()
MyComboBox.Focus()
Else
MyComboBox.Hide()
End If
Catch ex As Exception
Throw ex
End Try
End Sub
If I comment out the line MyComboBox.Focus() then tabbing into the cell does
not skip to the next cell. However, the combobox does not have the focus,
requiring the user to click into the combobox.
Does anyone know why this is happening?
Thanks,
Mike