L
Lasse Edsvik
Hello
Im trying to select current row in a datagrid if a user clicks it or uses
the arrowkeys to navigate in a datagrid.
i had this in MouseUp event but i need something else for CurrentCellChanged
event...... not sure what
System.Drawing.Point pt = new Point(e.X, e.Y);
DataGrid.HitTestInfo hti = dataGrid1.HitTest(pt);
if(hti.Type == DataGrid.HitTestType.Cell)
{
dataGrid1.CurrentCell = new DataGridCell(hti.Row, hti.Column);
dataGrid1.Select(hti.Row);
}
Im trying to select current row in a datagrid if a user clicks it or uses
the arrowkeys to navigate in a datagrid.
i had this in MouseUp event but i need something else for CurrentCellChanged
event...... not sure what
System.Drawing.Point pt = new Point(e.X, e.Y);
DataGrid.HitTestInfo hti = dataGrid1.HitTest(pt);
if(hti.Type == DataGrid.HitTestType.Cell)
{
dataGrid1.CurrentCell = new DataGridCell(hti.Row, hti.Column);
dataGrid1.Select(hti.Row);
}