Dhanraj K wrote:
Hello All,
I am new to CSharp. Somebody please tell me how to select the entire
row in a data grid on a mouse click event on any of the cell.
Thanx in advance
Dhannu
On the mouse up event you can do try this:
DataGrid.HitTestInfo htiHitTest = yourDataGrid.HitTest(e.X, e.Y);
if (htiHitTest.Type == DataGrid.HitTestType.Cell)
{
yourDataGrid.Select(yourDataGrid.CurrentRowIndex);
}
Replace [yourDataGrid] with the name of your datagrid.