469,926 Members | 2,330 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,926 developers. It's quick & easy.

Displayindex error for listview

Hello. I am getting an error when trying to remove/access items inside of a

System.ArgumentOutOfRangeException: Specified argument was out of the range
of valid values.
Parameter name: '500' is not a valid value for 'displayIndex'.

I only remove item 500 from the listview if the number of items is greater
than 500 (so it removes the last item). Also, I am updating items in the
listview with code:

for each node in listview.items
if node.subitems(1).text = *what i'm looking for* then
node.subitems(2).text = "Whatever"
end if
next node
end try

Now here's the fun fact: Adding, updating and removing items from the
listview are all contained in separate try blocks. Adding and updating
items are called from another class via raised events.

What is causing this error and how do I fix it?


Nov 21 '05 #1
0 966

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by trialproduct2004 | last post: by
8 posts views Thread by Boris | last post: by
reply views Thread by Tom | last post: by
reply views Thread by alan | last post: by
reply views Thread by c j anderson, mcp | last post: by
4 posts views Thread by Ken | last post: by
reply views Thread by news.microsoft.com | last post: by
reply views Thread by Brian | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.