|
-
December 26th, 2009, 01:53 AM
#1
ArgumentOutOfRange
Hello.
I have this ListView which has 5 columns. I am trying to access the 6th item of my ListView using
Code:
listview.Items[0].Subitems[5].Text
but it gives me an
Code:
InvalidArgument=Value of '5' is not valid for 'index'.
error.
I have declared in instantiated all columns, I can even access the 1st,3rd to 5th column but not the 6th.
Anyone?
-
December 26th, 2009, 01:57 AM
#2
Re: ArgumentOutOfRange
SubItems[5] is trying to access the 6th column. How many columns do you have?
-
December 26th, 2009, 02:01 AM
#3
Re: ArgumentOutOfRange
Yes, I am trying to access my 6th column. I have 6 columns all in all.
-
December 26th, 2009, 03:24 AM
#4
Re: ArgumentOutOfRange
Make sure your item had 5 subitems!
-
December 26th, 2009, 03:44 AM
#5
Re: ArgumentOutOfRange
 Originally Posted by kristof1104
Make sure your item had 5 subitems!
woah.didnt see that coming...thanks =)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|