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

Listview And Location Of Last Inserted Item

How would I go about determining at what position the last item inserted into a listview is?

Also, Is there a way to determine how many rows are in a listview?

Thanks
Darrell
0
larockd
Asked:
larockd
1 Solution
 
PapaDanielleCommented:
Check out these links. I am very sure they'll help u.

http:www.c-sharpcorner.com

http://www.c-sharpcorner.com/Code/2002/July/EditableListView.asp


http://www.codeproject.com/csharp/


I'll be back. Gotta make some calls.
0
 
naveenkohliCommented:
When you add an item into ListView, the return value from Add method is ListItem. You can check the index of inserted item from Index property of the returned ListItem object.

ListView insertedItem = myListView.Items.Add(newItem);

int newIdx = insertedItem.Index;
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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