By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,296 Members | 1,469 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,296 IT Pros & Developers. It's quick & easy.

How do I select an entire row when datagridview editmode property is set to EditOnEnter

P: n/a
Hi,

Can anyone give me the solution of selecting an entire row when
datagridview editmode property is set to EditOnEnter.

Thanks,
Amit

Aug 9 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I am not real sure what you are asking, but here is some code I use to select
an entire row when any cell on the row has been clicked. I use the
HitTestInfo object, and then make sure that the click is actually in a row
that is populated, then select the row.

private void testpointsCellChanged(object sender, MouseEventArgs e)
{
DataGrid.HitTestInfo hitInfo = testPointDatagrid.HitTest(new Point(e.X,
e.Y));
if (hitInfo.Row < datatableTestPointTab.Rows.Count && hitInfo.Row -1)
{
testPointDatagrid.Select(hitInfo.Row);
}
}

HTH

WhiteWizard
aka Gandalf
MCSD.NET, MCAD, MCT
"Amit" wrote:
Hi,

Can anyone give me the solution of selecting an entire row when
datagridview editmode property is set to EditOnEnter.

Thanks,
Amit

Aug 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.