Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > DataGrid Selection
 

DataGrid Selection

Hi all,
I'v found the solution to make full row selection in datagrid:


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); 
     } 

 
MigrationUser 1  Tuesday, May 13, 2003 2:16 PM
Hi,

I've just tried to use the HitTestInfo class but cannot find it in the System.Windows.Forms.Datagrid at all. I try to use it to select a row by double clicking it and then display the data in another form just like what TaskVision does.


Anyone knows what happens?

Cheers
MigrationUser 1  Wednesday, October 13, 2004 4:22 PM

You can use google to search for other answers

Custom Search

More Threads

• TaskVision VB.NET
• I need help on TaskVision someone plz!
• .NET Terrarium 1.0.25.300 Available
• [ADO.NET + VB 2005] Master Detail insert - one stored procedure or divided ?
• Windows application communication
• Local Terrarium as Screensaver
• Lots of Views, but no reply
• Open source version?
• SQL-Server setup
• Install Task Vision Server in a Domain