|
-
Jun 19th, 2009, 05:47 AM
#1
Thread Starter
Member
Invalid Key(tree View)
I have a treeview importing the data from board file on to treeview(Busnames as Paren node and Netnames as Chils nodes) .I have data which contains both Numeric and Non numeric values.Busname tracking both numeric and non numeric but netname(childnode) tracking only Charater based value but not numeric values.Its througing error as "Invalid Key" RunTime error - 35063
The error occuring in this line.I would appreciate if you provide the solution.
treeBusNode.Nodes.Add relative:=Bus_Name & "_Key", relationship:=tvwChild, Key:=CStr(Split(myArray(i), "!")(2)), Text:=CStr(Split(myArray(i), "!")(2))
-
Jun 19th, 2009, 03:48 PM
#2
Re: Invalid Key(tree View)
Most, if not all, VB keys do not accept numeric values. There are workarounds, for example, prefixing the numeric key with an alpha character: i.e., k35063 vs 35063
If you are concerned about whether to access your node with a prefix or not, simply prefix all keys with the same character. Stripping off the 1st character, if needed, to write the key to file is easy enough: Mid$(.Key, 2)
-
Jun 19th, 2009, 04:41 PM
#3
Re: Invalid Key(tree View)
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
|