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

how to set a focus on a datarow?

P: n/a
I would like to know how to set a focus to a datarow? (using
datarow.selected=true, select the row but does not show the row on the
screen visible if it is below/above the grid display area).

Jul 14 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Greetings,

In .NET 2.0 Use the following property:
DataGridView.FirstDisplayedScrollingRowIndex

Set that property of your DataGridView to the index value of the row you
wish to scroll to.

-DS
"DBC User" <db*****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>I would like to know how to set a focus to a datarow? (using
datarow.selected=true, select the row but does not show the row on the
screen visible if it is below/above the grid display area).

Jul 15 '06 #2

P: n/a
And then add
dataGridView.CurrentCell = dataGridView.FirstDisplayedCell;

To set input focus to selected row

/Lennart

"David Sandor" <help@-R-E-M-O-V-E-davidsandor.comskrev i meddelandet
news:%2****************@TK2MSFTNGP05.phx.gbl...
Greetings,

In .NET 2.0 Use the following property:
DataGridView.FirstDisplayedScrollingRowIndex

Set that property of your DataGridView to the index value of the row you
wish to scroll to.

-DS
"DBC User" <db*****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>>I would like to know how to set a focus to a datarow? (using
datarow.selected=true, select the row but does not show the row on the
screen visible if it is below/above the grid display area).


Jul 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.