Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select row on click
Message
De
21/08/2006 23:13:33
 
 
À
20/08/2006 12:46:18
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01147108
Message ID:
01147472
Vues:
21
This message has been marked as the solution to the initial question of the thread.
Brian,

Try playing around with the HitTest() method in an event like the MouseDown (sorry, it's C#, but you should still be able to get the idea for VB):
private void MouseDownHandler(object sender, MouseEventArgs e)
{
	System.Windows.Forms.DataGrid.HitTestInfo myHitTest = this.HitTest(e.X, e.Y);
	if (myHitTest.Type == System.Windows.Forms.DataGrid.HitTestType.Cell)
	{
		// myHitTest.Row will contain the index of the row in the DataTable.
	}
}
~~Bonnie


>I have a grid that is sortable and seachable. I'm tring to use it to select a record
>ie user clicks on the grid and that is the record they want to edit on the detail page.
>I'm having problems findind the row that the user has clicked. Anyone know how to do this?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform