ListView Control problem

S

samskas

Hi frnd,
I've a listview control with screen full of enteries (with
both the scrollbars). On a particular event I'm suppossed
to show the last item of the listview control.
Well, I've tried the following things but it is not
working:

listview1.Items[listview1.Items.Count - 1].Selected = true;
listview1.Items[listview1.Items.Count - 1].Focused = true;

Although the item gets selected, but the scrollbar doesn't
move accordingly to show the listview item
Can you plz suggest me a way to handle the above
situation..? Any tip or suggestion would be of great help.
Thanks
 
T

Thomas

Have you tried this?

listview1.EnsureVisible(listview1.Items.Count - 1);

Regards,
Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top