D
Dan
How can I select the full row in a datagrid? I tried the code below (from
the Syncfusion windows forms faq), so that all the cells of a row are
selected when I click on a single cell, BUT this has the effect of not
allowing multiple rows selection (ctrl-click or shift-click). How can I fix
this?
Thanx!
private void DataGrid_MouseUp(object sender, MouseEventArgs e)
{
DataGrid dg = (DataGrid)sender;
System.Drawing.Point pt = new Point(e.X, e.Y);
DataGrid.HitTestInfo hti = dg.HitTest(pt);
if (hti.Type == DataGrid.HitTestType.Cell)
{
dg.CurrentCell = new DataGridCell(hti.Row, hti.Column);
dg.Select(hti.Row);
}
}
the Syncfusion windows forms faq), so that all the cells of a row are
selected when I click on a single cell, BUT this has the effect of not
allowing multiple rows selection (ctrl-click or shift-click). How can I fix
this?
Thanx!
private void DataGrid_MouseUp(object sender, MouseEventArgs e)
{
DataGrid dg = (DataGrid)sender;
System.Drawing.Point pt = new Point(e.X, e.Y);
DataGrid.HitTestInfo hti = dg.HitTest(pt);
if (hti.Type == DataGrid.HitTestType.Cell)
{
dg.CurrentCell = new DataGridCell(hti.Row, hti.Column);
dg.Select(hti.Row);
}
}