473,322 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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
0 1120

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: trialproduct2004 | last post by:
Hi all i am having problem in listview which i am using in vb.net applicication At a time of calling method items.clear i am getting error that 'error :- can not obtain value'. And listview is...
8
by: Boris | last post by:
Hi folks! Look at the code: using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data;
0
by: Tom | last post by:
Hi, I built a web application which uses Listview (written by c# and xml). I test it without problem on local machine. However it occurs the following error when I install it on remote server....
0
by: alan | last post by:
Dear all, I'm trying to do a data binding for a ListView and I rewrite the code from some example but there is a error while I execute. Can anybody tell me what's wrong with it?? Thank you!! ...
0
by: c j anderson, mcp | last post by:
Synopsis: DataGridViewColumn reorder does not update display, but a repopulation of underlying dataset does... I must be missing something obvious. I have a scenario where the underlying XML...
4
by: Ken | last post by:
I am adding items to a listview and I get an exception that seems to be random. "500 is not a valid value for displayindex" I have searched the web looking for others with this problem and...
2
by: Tenowg | last post by:
Hey everyone.. I know the code below is a mess, but I have no idea what is going wrong. I am getting an MDR error whenever I do the foreach loop. If I comment out the loop it works fine, but ofcourse...
0
by: news.microsoft.com | last post by:
Hello.. I'm having an issue setting the DisplayIndex for my DataGridViewColumns The dataViewGrid is bound to a class derived from List<T> I'm doing something like: ...
0
by: Brian | last post by:
When my dgv was bound the displayindex setting worked fine. Now I am populating the dgv via in-line SQL and the setting the displayIndex does not work correctly. Before I attempt to set the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.