Solved

Datagridview and generic list

Posted on 2007-11-19
1
698 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
[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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
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…

630 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