[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Problem with binding a List to the ListBox Control

Asked by TRUVO_BE in .NET, Visual Basic Programming, Microsoft Visual Basic.Net

Tags: VB.NET

I'mexperiencing problems when I try to bind a List containing different objects, to a listbox control.
Below is the code that fills the List (found this on EE):

    Public Class ArcServeLog
        Public ServerName As String = ""
        Public MbWritten As Integer
        Public Errors As Integer
        Public Warnings As Integer
        Public Result As String = ""
        Public EntryList As New List(Of LogEntry)

        Public Sub AddLogEntry(ByVal input As String)
            Dim entry As New LogEntry
            Dim nfo As New CultureInfo("en-US", True)
            Dim pattern As String = "(?<time>\[.+\])\s(?<text>.+)"
            Dim match As Match = Regex.Match(input, pattern)

            If match.Success Then

                entry.TimeStamp = DateTime.Parse(match.Groups("time").Value.Substring(1, 19).Replace("-", " "), nfo)
                entry.Text = match.Groups("text").Value

            End If

            EntryList.Add(entry)

        End Sub

Then I try to bind the EntryList to the listbox by specifying a datasource and a display memeber:

        Me.lstEntries.DataSource = log.EntryList
        Me.lstEntries.DisplayMember = "text"

The result is that the listbox is beeing filled with object names or so (like ArcserveReader.ArcServeLogReader.ArcServeLog.LogEntry) in stead of the "text" value that resides in the list (see screenshot). I am using VB.Net Express 2008, and imho the list is filled with the correct data if I debug the code and look at this EntryList. However the needed data is some levels down. What do I need to do in orde to get the "text" or "time" values diplayed in the listbox?

Many thanks for helping me out.

Attachments:
 
Screenshot of List content in debug mode
Screenshot of List content in debug mode
 
[+][-]09/04/08 01:32 AM, ID: 22385129Accepted Solution

Your question has an Asker Certified™ answer! TRUVO_BE verified that this solution worked for them--which means it will likely work for you, too. Click to view the solution free for 30-days now.

About this solution

Zones: .NET, Visual Basic Programming, Microsoft Visual Basic.Net
Tags: VB.NET
Sign Up Now!
Solution Provided By: Binuth
Participating Experts: 3
Solution Grade: A
 
[+][-]09/04/08 01:01 AM, ID: 22384989Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/04/08 01:05 AM, ID: 22385008Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/04/08 01:16 AM, ID: 22385068Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/04/08 01:24 AM, ID: 22385089Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/04/08 01:26 AM, ID: 22385097Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/04/08 01:28 AM, ID: 22385107Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/04/08 01:30 AM, ID: 22385115Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/04/08 01:31 AM, ID: 22385117Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/04/08 01:32 AM, ID: 22385131Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09/04/08 01:48 AM, ID: 22385215Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/04/08 01:53 AM, ID: 22385237Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20100204-EE-VQP-115 / EE_QW_2_20070628