Solved

Datagridview and generic list

Posted on 2007-11-19
1
693 Views
Last Modified: 2008-02-01
My task class exposes a developer object
    Public Property Developer() As Developer
        Get
            Return mDeveloper
        End Get
        Set(ByVal value As Developer)
            mDeveloper = value
        End Set
    End Property


How can I access this while binding?

This is what I have tried and it does not display the full name.

dgvTasks.AutoGenerateColumns = False

Dim list As New List(Of Task)
Dim task As New Task()
list = task.GetTasks(projectID)

dgvTasks.DataSource = list
dgvTasks.Columns.Add("Description", "Description")
dgvTasks.Columns.Add("FullName", "Developer")

dgvTasks.Columns(0).DataPropertyName = "Description"
dgvTasks.Columns(1).DataPropertyName = "Developer.FullName"
0
Comment
Question by:JRockFL
1 Comment
 
LVL 18

Accepted Solution

by:
jcoehoorn earned 500 total points
ID: 20315214
Public Readonly Property DeveloperName() As String
        Get
            Return mDeveloper.FullName
        End Get
End Property

'...

dgvTasks.Columns(1).DataPropertyName = "DeveloperName"
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 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