I have a custom control containing a text box and a button. I am using a custom control as an edit control for a specific column in an ObjectListView.
In the CellEditStarting event, I:
private void datalistViewProducts_CellEditStarting(object sender, CellEditEventArgs e) { var ctl = (MyCustomControl)e.Control; e.Control = ctl; }
The ObjectListView ConfigureControl method already calls the Select control method. It works fine if I have a usercontrol inheriting directly from the standard TextBox.
So, I added the following code to my usercontrol:
public new void Select() { textBox.Select(); }
However, having user control as described above, the Select method does not move focus to the text field.
What am I missing here?
source share