467,176 Members | 1,334 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

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

Displayindex error for listview

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

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:

try
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
catch
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?

Thanks,

Ryan
Nov 21 '05 #1
  • viewed: 902
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by trialproduct2004@yahoo.com | 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.