How to set focus to a specific cell in a datagrid

  • Thread starter Thread starter Ofer B.
  • Start date Start date
O

Ofer B.

Hi

Is it possible, and how, to set focus to a specific cell in a datagrid?
I have to set the focus to specific cell in a row even if the user press
another cell in the same row

thanks
Ofer
 
You mean something like this (from the VS.Net Help)

[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);
}
 
Oops,
Yes, Thanks.

Ofer

John Kirk said:
You mean something like this (from the VS.Net Help)

[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);
}



Ofer B. said:
Hi

Is it possible, and how, to set focus to a specific cell in a datagrid?
I have to set the focus to specific cell in a row even if the user press
another cell in the same row

thanks
Ofer
 
Back
Top