SgDotNet
Singapore Professional .NET User Group -For Cool Developers

show system.collections.arraylist

Latest post 06-11-2007 12:38 AM by axel210. 2 replies.
  • 06-10-2007 11:46 PM

    show system.collections.arraylist

    Hi there,

     

    What i want to achieve is:

     

    I have 'System.Collections.ArrayList'

     I want to show all the values stored in this Arraylist.  Can i put it into a text box, list box, rich text box... anything at all?

     

    thanks in advance 

  • 06-11-2007 12:28 AM In reply to

    Re: show system.collections.arraylist

    What exactly are you trying to achieve?

    Is that data binding in ASP.NET (version 1.x or 2.0?) you are looking for?

    or are you thinking of data binding in Windows Forms (SmartClient) applications?

    or are you talking about declarative data binding in Windows Presentation Foundation (WPF)?

     

    Maung Maung
  • 06-11-2007 12:38 AM In reply to

    Re: show system.collections.arraylist

    I'm a little confused .. im a code newbie lol

     This is in a Windows Form.

    Not sure what version of VB I'm using, but let me explain what im doing more:

     

    I'm retrieving a big value in a text box from a database.  The data returned is apparently a system.collections.arraylist 

    I then want  to get this retrieved value and put it somewhere on a form, using a list box, text box, or something.  Here is my code so far:

     

     I have a list box with a list of 'subjects' in.  When the user clicks on a subject, the query searched for the 'description' of the subject entered.

     

    this is my code: 

     ====================================

    varSel = lstinfo.SelectedItem()

    xConn = New sqlConn
            xConn.connectMe("SELECT [Description] FROM Subject WHERE Subject = ""& varSel""")


            For iCounter = 0 To xConn.getData.Count - 1
              

    Next
            xConn.OLEConn.Close()

     =============================

    The next step is to display it somewhere on my form.. and I dont know how to do it .. i hope i explained myself alright this time!Smile

     

     

Page 1 of 1 (3 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems