Alexei_shk

Hi,

How can I send back the focus to the cell in DataGrid after the change is commited

I am using .Net 1.1 and VS2003.

Thank's

Alexei




Re: Windows Forms General Send back the focus of cell in DataGrid

Tamirro

Try to use SendKeys.Send("{+TAB}")

It's simulate the combinatio Shift+TAB





Re: Windows Forms General Send back the focus of cell in DataGrid

Alexei_shk

Hi,

It doesn't work. The user can click on other column than next column and get the checking of column.

So how can I set that the cell is editing now.

Thank's

Alexei






Re: Windows Forms General Send back the focus of cell in DataGrid

Alexei_shk

Hi,

I have found the solution:

[Visual Basic]
Private Sub SetCellWithFocus(ByVal myGrid As DataGrid)
' Set the current cell to cell 1, row 1.
myGrid.CurrentCell = New DataGridCell(1,1)
End Sub

[C#]
private void SetCellWithFocus(DataGrid myGrid)
{
// Set the current cell to cell1, row 1.
myGrid.CurrentCell = new DataGridCell(1,1);
}

Thank's

Alexei