I have an UltraWinGrid and I want to give the focus to a specific cell and make it enter edit mode programmatically (no click). So I did this :
If myUltraWinGrid.ActiveRow IsNot Nothing Then
myUltraWinGrid.ActiveCell = myUltraWinGrid.ActiveRow.Cells("foo")
myUltraWinGrid.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode)
Else
myUltraWinGrid.ActiveCell = myUltraWinGrid.Rows(0).Cells("foo")
myUltraWinGrid.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode)
EndIf
Which should work but it only gives focus to the row (no edit mode).
fooColumn
|
\_/
I don't know why but calling it with
BeginInvoke
solved the issue.Because it's executed by another thread by some reason
myUltraWinGrid.BeginInvoke(new MethodInvoker(()=> myUltraWinGrid.PerformAction(UltraGridAction.EnterEditMode)));