User (Old forums)MemberJuly 10, 2009 at 12:46 pmPost count: 23064
Can someone review the following code and tell me what I am missing ? please 🙂
The first part works, it populates the columns, the 2nd part for rows doesn’t. It is populating the very last column in the table and leaving the rest of the enteries blank.
rebuilt is a listbox control which contains line-by-line data I am converting to an array, all of the data in the rebuilt listbox I need populated on rows under the columns.
Dim total_entries As Integer = rebuilt.Items.Count – 1
Dim entry_values() = vars.table_header.Split(“,”)
For q As Integer = 0 To entry_values.Length – 1
New Column(entry_values(q), GetType(Integer)))
For q As Integer = 0 To rebuilt.Items.Count – 1
Dim pass_entry As String = rebuilt.Items.Item(q)
Dim entry_values2() = pass_entry.Split(“,”)
GridControl1.DataSource = entry_values2
Imported from legacy forums. Posted by WhiteZombie (had 1770 views)User (Old forums)MemberJuly 12, 2009 at 1:45 amPost count: 23064
Any input on this would be helpful please
Imported from legacy forums. Posted by WhiteZombie (had 1278 views)User (Old forums)MemberJuly 13, 2009 at 2:01 pmPost count: 23064
Not too sure what you are trying to do in the second loop. I think you should review your code. (Setting the DataSource within the loop itself is probably not what you want to do, I guess?)
A breakpoint could be a good idea in that second loop, while keep an eye on the Locals to see what is going on compared to what you are expecting.
Imported from legacy forums. Posted by Ghislain (had 187 views)User (Old forums)MemberJuly 13, 2009 at 2:06 pmPost count: 23064
Thanks so much for the reply. Basically I am trying to go from a LISTBOX into an Array into a Table. Or just from Lixbox to the Table, I need it so the information in my listbox becomes visable to the user in an excel type format. I basically read CSV files and parse up the strings and then reconstruct them and now I need to spit them back out so the user can view the newly created values. I wasn’t sure if Datasource is what I needed or what, I have yet to be able to create rows, but I can create columns with no problems.
Imported from legacy forums. Posted by WhiteZombie (had 443 views)User (Old forums)MemberJuly 13, 2009 at 10:20 pmPost count: 23064
Imported from legacy forums. Posted by WhiteZombie (had 298 views)
- You must be logged in to reply to this topic.