DataGridView

  • Thread starter Thread starter Samuel Shulman
  • Start date Start date
S

Samuel Shulman

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
 
Samuel said:
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.
 
that works, thank you

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

Samuel
 
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
 
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
 
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
 
gene said:
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.
 
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
 
Back
Top