How i can give focus to a cell in the grid (in case of new row or in case of editing the existing row).
thanks,
parv
Hi Parv,
You can call the Activate method on the cell or set the grid's ActiveCell to that cell. If you also want the cell to go into edit mode, then you could use the grid's PerformAction method for this.
Hi,
I tried activecell and activate but nothing worked for me. Check code given below.
Please let me know where i'm wrong.
Thanks,
Dim aa As Decimal
Dim ab As String
aCell = Me.UltraGrid1.ActiveRow.Cells("Quantity")
If aCell.Column.Key = "Quantity" Then
aa = e.NewValue 'e.Row.Cells("Quantity").Value
If aa > 100 Then
ab = aa
'Me.UltraGrid1.ActiveCell = e.Cell
'Me.UltraGrid1.Focus()
'Me.UltraGrid1.ActiveRow = e.Row
'Me.UltraGrid1.PerformAction(UltraGridAction.EnterEditMode, False, False)
aCell.Activate()
e.Cancel = True
End If
End Sub