Home Forums WinForms controls Xceed Grid for WinForms Array to Table?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17181 |

    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

    GridControl1.Columns.Add(

    New Column(entry_values(q), GetType(Integer)))

    Next

    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

    Next

     

    Imported from legacy forums. Posted by WhiteZombie (had 1770 views)

    User (Old forums)
    Member
    Post count: 23064

    Any input on this would be helpful please

    Imported from legacy forums. Posted by WhiteZombie (had 1278 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    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)
    Member
    Post 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)
    Member
    Post count: 23064

    bump

    Imported from legacy forums. Posted by WhiteZombie (had 298 views)

    User (Old forums)
    Member
    Post count: 23064

    bump! 🙂

    Imported from legacy forums. Posted by WhiteZombie (had 2075 views)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.