On 2008-11-10, Vic <vs*******@telenet.bewrote:
I have a ArrayList bound to a DataGridView.
The objects in de arryalist have 5 propertie but i need only 3 of then in de
datagridview.
Cane somebody tell me how to prevent that some of the properties are not
show.
Best Regards
Vic
The only way I know is to turn AutGenerateColumns to false and then add the
columns you want:
myDataGridView.AutoGenerateColunns = False
Dim firstColumn As = new DataGridViewTextBoxColumn()
firstColumn.Name = "First Column"
' the name here is the name of the property of
' the object you want to be bound to this column
firstColumn.DataPropertyName = "MyProperty"
myDataGridView.Columns.Add(firstColumn)
' rinse and repeat until all columns are added.
HTH
--
Tom Shelton