Hi,
I have a datagrid & a datatable, and when I use the mousemove event, I run
into trouble.
private void dgMouseMove(obj ect sender, System.Windows. Forms.MouseEven tArgs 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(hi tInfo.Row,hitIn fo.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 1 1604
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? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 BackColor
{
get{return this.BackColor;}
set{
this.BackColor=value;
|
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 TO HIGHLIGHT ROW
Sub Datagrid_ItemCommand(ByVal s As Object, ByVal e As
DataGridCommandEventArgs)
If e.CommandName = "ViewUnitRequest" Then
e.Item.BackColor = System.Drawing.Color.LightGray
|
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 Me.Controls.Item(iSeatNumber).BackColor.Equals(Color.White) Then
Me.Controls.Item(iSeatNumber).BackColor.Equals(Color.CornflowerBlue)
'End If
|
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 source DataTable (DataGrid.DataSource=DataTable).
I would like to be able to get the column name of the
datagrid based on the DataGrid current cell so I can reference
the appropriate column in the source DataTable.
|
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 written on the
glass pane. i need to be able to see the control or form that is underneath
the RichTextbox, and at the same time to be able to write and erase text to
the RichTextbox.
i'm assuming that it is the backcolor that hides what is...
| |
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 that I can't
explain. One of the desired affects was to provide the ability to
change the background color on images that were selected, as well as
setting the background color back to its original color after the image
had been deselected.
To...
|
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 zig-zagging down the rows from left to right.
I'm calling this method below in my CellEndEdit event:
private void AdvanceCellFocus(DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 0)
{
|
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)
myGrid.CurrentCell = new DataGridCell(1,1);
does not work, fro a DataGridView, since we cannot create a DataGridView
Cell while specifying only its row and column.
|
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 cell programatically. what is wrong here.
also i have used from within a button_click event as follows
1- MyGrid.CurrentCell.Value = 22
2- MyGrid.Rows(0).Cells(0).value = 22
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |