O
Orlando Cavadini
Hello
I bind a collection of objects with Type AB (Class AB) to a DataGrid control
as following:
Public Class AB
Private m_AA As Integer
Private m_AB As Integer
Private m_AC As Integer
Public Property AA() As Integer
Get
Return m_AA
End Get
Set(ByVal Value As Integer)
m_AA = Value
End Set
End Property
Public Property AB() As Integer
Get
Return m_AB
End Get
Set(ByVal Value As Integer)
m_AB = Value
End Set
End Property
Public Property AC() As Integer
Get
Return m_AC
End Get
Set(ByVal Value As Integer)
m_AC = Value
End Set
End Property
End Class
....
Private m_list As New Collection
....
Dim c As AB
c = New AB
c.AA = 9
c.AB = 99
c.AC = 999
m_list.Add(c)
c = New AB
c.AA = 8
c.AB = 88
c.AC = 888
m_list.Add(c)
....
DataGridSections.DataSource = m_list
The DataGrid shows three columns AA, AB, AC with two rows of data. That
works fine. But now, i'd like to show only the columns AB and AC. What do I
have to do to get this result. Everything I tried failed.
Many Thanks for your help in advance
Orlando
I bind a collection of objects with Type AB (Class AB) to a DataGrid control
as following:
Public Class AB
Private m_AA As Integer
Private m_AB As Integer
Private m_AC As Integer
Public Property AA() As Integer
Get
Return m_AA
End Get
Set(ByVal Value As Integer)
m_AA = Value
End Set
End Property
Public Property AB() As Integer
Get
Return m_AB
End Get
Set(ByVal Value As Integer)
m_AB = Value
End Set
End Property
Public Property AC() As Integer
Get
Return m_AC
End Get
Set(ByVal Value As Integer)
m_AC = Value
End Set
End Property
End Class
....
Private m_list As New Collection
....
Dim c As AB
c = New AB
c.AA = 9
c.AB = 99
c.AC = 999
m_list.Add(c)
c = New AB
c.AA = 8
c.AB = 88
c.AC = 888
m_list.Add(c)
....
DataGridSections.DataSource = m_list
The DataGrid shows three columns AA, AB, AC with two rows of data. That
works fine. But now, i'd like to show only the columns AB and AC. What do I
have to do to get this result. Everything I tried failed.
Many Thanks for your help in advance
Orlando