473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 1594
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: perspolis | last post by:
HI I created a user control and place some control on it. I need when I change BackColor of user control,Back Color of other controls also change.. I used foloowing code: public override Color...
6
by: LU | last post by:
A)I build a datagrid based on a calendar date selection. B)When user clicks a button column on the datagrid I want to highlight this row. I use the code below to highlight the row. ***** CODE...
1
by: Firewalker | last post by:
I am attempting to change the backColor property on the previously instantiated buttons FROM a listbox_doubleClick event. I thought it would be something like this: If...
6
by: Strahimir Antoljak | last post by:
Is it possible (and how?) to get the data grid column name based on the DataGrid.CurrentCell? The DataGrid has assigned a TableStyle comprising selected columns (DataGridTextBoxColumn) from the...
4
by: ray well | last post by:
in my app i need to make a RichTextbox control transparent. i need it to be a like a pane of glass lying on a sheet of paper, where u can see everything on the sheet of paper not covered by text...
3
by: senfo | last post by:
I developed a Windows control in VS 2005 that inherits from the PictureBox Control that adds the ability to select images in a Windows application. It is, however, experiencing a strange issue...
2
by: sklett | last post by:
I have a 2 column DGV. When a user enters a value in cell 0,0 I want to set cell 0,1 as current, when they enter a value in cell 0,1 I want to set cell 1,0 current, etc, etc basically...
4
by: Michel Walsh | last post by:
Someone has an example, C#, about how to set the cell(int row, int col) as the current cell for a DataGridView. The example, in the help file, about DataGrid.CurrentCell Property (Set) ...
4
Luckie
by: Luckie | last post by:
Hi All experts there, I am developing a software using datagridview (vb6 feels better) and i am using virtualMode. it shows the focus blue box but it is not possible to fill data to the first...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.