[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Listview And Location Of Last Inserted Item

Posted on 2002-07-25
2
Medium Priority
?
364 Views
Last Modified: 2008-03-03
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
Comment
Question by:larockd
2 Comments
 
LVL 1

Expert Comment

by:PapaDanielle
ID: 7179258
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
 
LVL 23

Accepted Solution

by:
naveenkohli earned 200 total points
ID: 7179959
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

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview
Suggested Courses
Course of the Month19 days, 11 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question