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

DataGridView

P: n/a
I want to programatically select a row in the list and make it visible in
case the row is not already visible because of the length of the list
Thanks in advance,
Samuel
Aug 10 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Samuel Shulman wrote:
I want to programatically select a row in the list and make it visible in
case the row is not already visible because of the length of the list
Thanks in advance,
Samuel

I am actually about to do this myself, to implement a find feature for
a DataGridView.

You should be able to do this via DataGridView.CurrentCell

BTW, please do not rely on people reading the subject line of your
message. In fact, write the subject line *after* the message. I have no
idea why it is on top, encouraging people to title something they
haven't written yet.

B.

Aug 10 '06 #2

P: n/a
that works, thank you

I find that there is relatively little knowledge about this control which is
extremely useful

Samuel
"Brian Tkatch" <Ma***********@ThePentagon.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
Samuel Shulman wrote:
>I want to programatically select a row in the list and make it visible in
case the row is not already visible because of the length of the list
Thanks in advance,
Samuel


I am actually about to do this myself, to implement a find feature for
a DataGridView.

You should be able to do this via DataGridView.CurrentCell

BTW, please do not rely on people reading the subject line of your
message. In fact, write the subject line *after* the message. I have no
idea why it is on top, encouraging people to title something they
haven't written yet.

B.

Aug 10 '06 #3

P: n/a
Samuel,
>
I find that there is relatively little knowledge about this control which
is extremely useful
I would not say so it is constantly growing, however especially Ken is
constantly putting more information about the DataGridView on our website.

http://www.vb-tips.com/dbpages.aspx?IA=DG2

You can have a look at the CodeCamp button as well to see Ken's presentation
about the DataGridView

I hope this helps,

Cor
Samuel
"Brian Tkatch" <Ma***********@ThePentagon.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
>Samuel Shulman wrote:
>>I want to programatically select a row in the list and make it visible
in
case the row is not already visible because of the length of the list
Thanks in advance,
Samuel


I am actually about to do this myself, to implement a find feature for
a DataGridView.

You should be able to do this via DataGridView.CurrentCell

BTW, please do not rely on people reading the subject line of your
message. In fact, write the subject line *after* the message. I have no
idea why it is on top, encouraging people to title something they
haven't written yet.

B.


Aug 11 '06 #4

P: n/a
On Thu, 10 Aug 2006 16:37:46 +0100, "Samuel Shulman" <sa************@ntlworld.comwrote:
>I want to programatically select a row in the list and make it visible in
case the row is not already visible because of the length of the list
Thanks in advance,
Samuel
If you know the RowIndex of the selected item:

Me.DataGridView.FirstDisplayedScrollingRowIndex = Value

Where value is the Row Index to be displayed at the first visible position
Gene

Aug 11 '06 #5

P: n/a
Brian and Samuel,
BTW, please do not rely on people reading the subject line of your
message. In fact, write the subject line *after* the message. I have no
idea why it is on top, encouraging people to title something they
haven't written yet.
Some newsreaders will try to find the same subject and place that in top of
an existing one.
(Which can be depending the options set for that newsreader and if it still
exist on the newsserver, but the latest is often with Google when the
subject is not good set).

Therefore it is not clever to use a Subject as "DataGridView" or by instance
"Help".

(In this way you can by instance reset the date and time by *newsgroup*
topposters. Don't confuse this with email topposters).

I hope this gives an idea,

Cor


Aug 11 '06 #6

P: n/a

gene kelley wrote:
On Thu, 10 Aug 2006 16:37:46 +0100, "Samuel Shulman" <sa************@ntlworld.comwrote:
I want to programatically select a row in the list and make it visible in
case the row is not already visible because of the length of the list
Thanks in advance,
Samuel

If you know the RowIndex of the selected item:

Me.DataGridView.FirstDisplayedScrollingRowIndex = Value

Where value is the Row Index to be displayed at the first visible position
Gene
Very nice. I think this is what i will use.

These names are so confusing. :)

B.

Aug 11 '06 #7

P: n/a
On 11 Aug 2006 06:32:29 -0700, "Brian Tkatch" <Ma***********@ThePentagon.comwrote:
>
gene kelley wrote:
>On Thu, 10 Aug 2006 16:37:46 +0100, "Samuel Shulman" <sa************@ntlworld.comwrote:
>I want to programatically select a row in the list and make it visible in
case the row is not already visible because of the length of the list
Thanks in advance,
Samuel

If you know the RowIndex of the selected item:

Me.DataGridView.FirstDisplayedScrollingRowIndex = Value

Where value is the Row Index to be displayed at the first visible position
Gene

Very nice. I think this is what i will use.

These names are so confusing. :)

B.
Yes, it is/was confusing. For years, this generally is commonly called "EnsureVisible" as is the
case with the ListView.

Gene
Aug 11 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.