Solved

Listview And Location Of Last Inserted Item

Posted on 2002-07-25
2
347 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 50 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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