Hi, sorry for the newbie questions but I've looked for this one and can't find it discussed prior. GridWrapCellBehavior.NextControlInForm works great as far as adding the new row, but the input focus always heads back to cell(1,1) despite the following .MoveTo. Is there some sort of overriding behavior for the grid that is defaulting to this action? As your code has, I want to set the focus to the first column of the new row for additional input. Thanks again for your great help.
mike
> If you set the WrapCellCellBehavior to move to the next control on the form, the WrapCellNextControlInForm event will be raised when you try to tab off the last cell. In the handler, you can increment the rowcount, explicitly move the current cell, and cancel the event to get the behavior you want.
>
>
> Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
> Me.GridControl1.Model.Options.WrapCellBehavior = GridWrapCellBehavior.NextControlInForm
> End Sub
>
> Private Sub GridControl1_WrapCellNextControlInForm(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridWrapCellNextControlInFormEventArgs) Handles GridControl1.WrapCellNextControlInForm
> Me.GridControl1.RowCount += 1
> Me.GridControl1.CurrentCell.MoveTo(Me.GridControl1.RowCount, 1)
> e.Cancel = True
> End Sub
>