Solved

how do i get the data out of a multi field arraylist

Posted on 2008-10-04
1
153 Views
Last Modified: 2008-10-06
first i read the data from database to the arraylist named arrspclist,
then i set the combobox's data source to arrspclist.
with displaymember to "SpecialID" and ValueMember = "SpecialName"
now, everytime when there is a change on selection of combobox item, it will display the new info (Sp1Amount, Sp1Price,SP2Amount,SP2Price) to the other textboxes according  to the selection
but i have no idea how to do this getting the info out of a specific arraylist item.
hope i am explaining clearly
thank you
Public Class PdtSpecial 'arraylist's structure
    Private mySpecialID As String
    Private mySpecialName As String
    Private mySpecial1Amount As String
    Private mySpecial1Price As String
    Private mySpecial2Amount As String
    Private mySpecial2Price As String
 
    Public Sub New(ByVal strID As String, ByVal strName As String, ByVal strSP1Amt As String, ByVal strSP1Prc As String, ByVal strSP2Amt As String, ByVal strSP2Prc As String)
        Me.mySpecialID = strID
        Me.mySpecialName = strName
        Me.mySpecial1Amount = strSP1Amt
        Me.mySpecial1Price = strSP1Prc
        Me.mySpecial2Amount = strSP2Amt
        Me.mySpecial2Price = strSP2Prc
    End Sub 'New
 
    Public ReadOnly Property SpecialID() As String
        Get
            Return mySpecialID
        End Get
    End Property
 
    Public ReadOnly Property SpecialName() As String
        Get
            Return mySpecialName
        End Get
    End Property
 
    Public ReadOnly Property Special1Amount() As String
        Get
            Return mySpecial1Amount
        End Get
    End Property
    Public ReadOnly Property Special1Price() As String
        Get
            Return mySpecial1Price
        End Get
    End Property
    Public ReadOnly Property Special2Amount() As String
        Get
            Return mySpecial2Amount
        End Get
    End Property
    Public ReadOnly Property Special2Price() As String
        Get
            Return mySpecial2Price
        End Get
    End Property
End Class '

Open in new window

0
Comment
Question by:CLWU
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 50 total points
ID: 22649843
No, I don't quite understand what you mean by "getting the info out of a specific arraylist item".  Do you know anything about generics--List(Of dtSpecial)?  

Do you mean something like this?

Dim list As New List(Of dtSpecial)
Me.ComboBox1.DataSource = list
Me.ComboBox1.DisplayMember = "SpecialName"
Me.ComboBox1.ValueMember = "SpecialID"

...

Dim special As DtSpecial = list(Me.ComboBox1.SelectedIndex)
Dim specialName As String = special.SpecialName
Dim specialID As Integer = special.SpecialID
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question