|
-
Mar 12th, 2000, 06:31 PM
#1
Thread Starter
Lively Member
I am trying to attach a key to my items I'm adding in the listview control and I get the error "Invalid key".
The key I am adding is a primary number "13" which I use as a string. I thought the key accepted a string. I also tried to make it a integer but that did not work either. I think its something to do with the key being unique. I can't figure it out.
-
Mar 13th, 2000, 04:55 PM
#2
Lively Member
Your problem is not a 'unique' identity problem, otherwise the list would tell you so with the error 'Key is not unique in collection'.
The thing about Listviews and keys is that even though you may convert '13' into a string, it still recognises it as a number (we'll call it cleverness shall we?).
If you want to use a numeric as the key, the best thing to do is append a single letter before the number you want to use...ie make the key 'K13' instead of just '13'.
Hope this helps you!
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
|