Solved

Listview And Location Of Last Inserted Item

Posted on 2002-07-25
2
339 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: Ivo
Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now