how can i make a full row select in a datagrid
-
how can i make a full row select in a datagrid, without using the row headers? im using visual studio.net 2003
-
how can i make a full row select in a datagrid, without using the row headers? im using visual studio.net 2003
Handle a mouse event and use HitTestInfo
private void DataGrid1MouseDown(object sender, MouseEventArgs e) { HitTestInfo hit = DataGrid1.HitTest(e.X, e.Y); if( hit.Type == HitTestType.Cell ) DataGrid1.Select(hit.Row); }
only two letters away from being an asset
-
how can i make a full row select in a datagrid, without using the row headers? im using visual studio.net 2003
If you want this to be a permanent feature then I would do it by setting the grids SelectionMode property to be FullRowSelect. This can be done through code: dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; Or on the properties window.