Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2 Datagrid questions...
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00703233
Message ID:
00704966
Views:
17
Are you calling the Static HitTestInfo? Try this C# code:
private void dataGrid1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) 
{ 
     System.Drawing.Point pt = new Point(e.X, e.Y); 
     DataGrid.HitTestInfo hti = dataGrid1.HitTest(pt); 
     if(hti.Type == DataGrid.HitTestType.Cell) 
     { 
          dataGrid1.CurrentCell = new DataGridCell(hti.Row, hti.Column); 
          dataGrid1.Select(hti.Row); 
     } 
} 
>Cathi...
>
>Thanks for your response.
>
>I'm using C#, so I tried to convert it. However, I must be missing something, because I'm not able to access things like HITTESTINFO. I even tried a code sample from MSDN that was written for .NET, but the code that I paste in doesn't even run. (Even typing 'System.Windows.Forms.DataGrid.HitTestInfo myhit results in an error).
>
>Kevin
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform