473,662 Members | 2,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Windows. Forms.DataGrid. HitTestInfo missing

I'm trying to use DataGrid.HitTes tInfo in my OnMouseDown event but firstly I cannot see it in Intellisense, secondly when I try to use it I get strange 'COMPILE' errors when building the app

I'll be happy to provide more details if anyone has any answers

I've read some forums and someone else had similar problem but there were no solutions provided

Can anyone from MS comment on this?
Nov 16 '05 #1
2 1980
Use something like this

private void dataGrid1_Mouse Down(object sender,
System.Windows. Forms.MouseEven tArgs e)
{
DataGrid.HitTes tInfo hti = this.dataGrid1. HitTest(e.X, e.Y);
}

Should work just fine.

Cheers,
Branimir
--
Branimir Giurov
MCSD.NET, MCDBA

"Tom P" <an*******@disc ussions.microso ft.com> wrote in message
news:4A******** *************** ***********@mic rosoft.com...
I'm trying to use DataGrid.HitTes tInfo in my OnMouseDown event but firstly I cannot see it in Intellisense, secondly when I try to use it I get strange
'COMPILE' errors when building the app.
I'll be happy to provide more details if anyone has any answers.

I've read some forums and someone else had similar problem but there were no solutions provided.
Can anyone from MS comment on this?

Nov 16 '05 #2
First of all thanks for the quick repl

That's exactly what I was doing before
It would compile that line but then failed o
if (hti.Type == DataGrid.HitTes tType.Cell

// code her
Guess what! I've just retyped everything again and it works
Bugger me! I still can't get the Intelisense thingo happening but never mind that

The thing is I've got another piece of code from another person, done on a different computer and when I open it, my version of .NET recognises HitTestInfo (Intelisense-wise). But It doesn't when I create my projects
Have you got any idea what's going on? Couldn't find any info on this on MS site or otherwise

Thanks for your help

Tom P
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9130
by: Terrence | last post by:
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in system.windows.forms.dll
0
1989
by: Victor Crudu | last post by:
Hi, could somebody help me to solve the follwing problem ? I get the following exception when i set as the DataSource of a DataGrid a DataTable. This situation can be only if I change programaticaly the minimum property of the scroll bar to be >0. But i even do not have access to the scroll bars of the grid because the scrollbars are protected. Unhandled Exception:
3
2143
by: max | last post by:
I can generate this error by NOT assigning a tableName to the view: at System.Windows.Forms.DataGrid.AddNewRow() at System.Windows.Forms.DataGridAddNewRow.OnEdit() Is there any possibility of getting an event from the AddNewRow()? I would like to make some changes to the row prior to the user typing in the DataGrid. Thanks,
3
2397
by: scott | last post by:
hi all, hope some one can help iv created a datagrid that points to a DataView. the data view takes in a DataTable. The DataTable then adds the columns using DataColumn. All fine so far. The table is set up and i can add stuff to it (text). however i had made it so that u can't change the text wtih in the table,
1
6633
by: melanieab | last post by:
Hi again, I'm trying to programatically sort a datagrid. I did find the following code, and it does work, but, when a column header is clicked, the data only sorts in descending order. Clicking the same column header again doesn't change anything, although clicking a different column header re-sorts the data in descending order according to whatever's in that column. I'm pretty much at a loss as to how to even start fixing this. Any...
1
2113
by: melanieab | last post by:
Hi, I'm have a datagrid, and I'm trying to have a tooltip pop up if a cell has been hovered on for 2 seconds. I was thinking of using DataGrid.Hover, but then decided to try this instead: static System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer(); private void dg_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { System.Timers.Timer timer = new System.Timers.Timer();
3
1093
by: melanieab | last post by:
Hi, I'd been saying DataGrid.HitTestInfo HitInfo = dg.HitTest(e.X, e.Y); for a while without any problem (of course with using System.Windows.Forms;). Then suddently I got errors and had to add System.Windows.Forms. in front of DataGrid.HitTestInfo. Just wondering if anyone knew of possible reasons for this. Thanks! Melanie
0
1971
by: Mike | last post by:
Hi, I have a collection object bound to a data grid, after I remove an item from the collection, the minute I click on the datagrid I get an error saying the specified argument was out of the range of valid values. After I remove the element from the collection I clear the databindings from the data grid and rebind it but as far as I can tell the collection seems to be the right size but for some reason when I
1
1175
by: asprabahar | last post by:
Hi I have a Different Issue the Class DataGrid.HitTestInfo is missing . The issue is when i type DataGrid and then when i type (.) and the HitTestInfo is not diaplaying ,but the say way when i copy from some were and past it in the code it works .. What may be the Issue? Regards Prabakar
0
8435
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, 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...
0
8768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7368
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, 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...
1
6186
isladogs
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...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2763
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 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.