471,347 Members | 1,770 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,347 software developers and data experts.

currentcell backcolor

Hi,
I have a datagrid & a datatable, and when I use the mousemove event, I run
into trouble.
private void dgMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
System.Windows.Forms.DataGrid.HitTestInfo hitInfo = dg.HitTest(new
Point(e.X, e.Y));
.... // find out which cell is entered
dg.CurrentCell = new DataGridCell(hitInfo.Row,hitInfo.Column);
.... // use tooltip
}
The problem starts when I set dg.CurrentCell. Whatever it's set to, the
backcolor of that cell changes to what looks like some default color (biege),
and the text is highlighted. Also, the MouseUp event doesn't seem to fire, at
least not consistently. I've been trying to figure this one out for a while
now, and am pretty stuck. Anyone know what to do?
Thanks,
Mel

Dec 28 '05 #1
1 1504
KJ
You do know that the primary purpose of setting the CurrentCell
property (a struct) is to set focus? That is why it changes color
(takes focus). What is your goal?

Dec 29 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by perspolis | last post: by
6 posts views Thread by LU | last post: by
6 posts views Thread by Strahimir Antoljak | last post: by
4 posts views Thread by Michel Walsh | last post: by
reply views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.