• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 506
  • Last Modified:

How can I always show the last item in the Listview?

?
0
xewoox
Asked:
xewoox
  • 2
1 Solution
 
Sreedhar VengalaSr. Consultant - Business IntelligenceCommented:
something as : lstBox.SelectedIndex = lstBox.Items.Count - 1
0
 
anarki_jimbelCommented:
Selection is one way. Sometimes selection is not the besr option.
Another wayI's say more proper way:

 ListViewItem lvi = ListView1.Items[ListView1.Items.count-1);
lvi.EnsureVisible ();
0
 
xewooxAuthor Commented:
lstBox.SelectedIndex = lstBox.Items.Count - 1 - This does not work


lvi.EnsureVisible (); - no such function in C# WPF
0
 
anarki_jimbelCommented:
xewoox, just a comment - you never told your question was related to WPF. You have to be more specific in your questions so people don't waist their time.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now