Hi,
I'm am trying to solve this problem for a month!!!
I want that all the cells would'nt be highlighted at any time...
I Tried this code:
public class dgInherit : System.Windows.Forms.DataGrid
{
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{
DataGrid.HitTestInfo hitTestInfo = this.HitTest(e.X, e.Y);
if ( hitTestInfo.Type == HitTestType.Cell)
{
return;
}
if (hitTestInfo.Type == HitTestType.ColumnResize)
{
return;
}
if (hitTestInfo.Type == HitTestType.RowResize)
{
return;
}
base.OnMouseDown(e);
}
protected override void OnEnter(EventArgs e)
{
}
}
I thaught that i solved the problem... But There is a new one.
When i'm using the scroll bars then the first cell in the row is highlighted!!!
PLZ Help me...
:-( BogN