Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select row on click
Message
From
21/08/2006 23:13:33
 
 
To
20/08/2006 12:46:18
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01147108
Message ID:
01147472
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform