System.Windows.Forms.DataGrid.HitTestInfo missing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to use DataGrid.HitTestInfo 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?
 
Use something like this

private void dataGrid1_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
DataGrid.HitTestInfo hti = this.dataGrid1.HitTest(e.X, e.Y);
}

Should work just fine.

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

Tom P said:
I'm trying to use DataGrid.HitTestInfo 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.
 
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.HitTestType.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
 
Back
Top