Well I don't know if this will help but in the code below I defined a
"table style" (after loading the datagrid) with just two columns - and that
is all the datagrid displays... Maybe there is an easier way to get what
you want though... I am quite new to .net
Brad
Private Sub frmAssetMaster_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim ds As New DataSet()
Dim dgTableStyle As DataGridTableStyle
SqlDataAdapter1.Fill(ds)
Me.DataGrid1.DataSource = ds
Me.DataGrid1.DataMember = "ComputerMaster"
'Create a data grid table style.
dgTableStyle = New DataGridTableStyle()
'Map the table style to a table
dgTableStyle.MappingName = "ComputerMaster"
' Declare two columns
Dim dgTextBoxCol As New DataGridTextBoxColumn()
Dim dgTextBoxCol2 As New DataGridTextBoxColumn()
' Set column 1 properties
dgTextBoxCol.MappingName = "ComputerName"
dgTextBoxCol.NullText = ""
dgTextBoxCol.HeaderText = "Asset Name"
' Set column 2 properties
dgTextBoxCol2.MappingName = "RAM"
dgTextBoxCol2.NullText = ""
dgTextBoxCol2.HeaderText = "RAM"
' Add the columns to the table style
dgTableStyle.GridColumnStyles.Add(dgTextBoxCol)
dgTableStyle.GridColumnStyles.Add(dgTextBoxCol2)
' Add the table style
Me.DataGrid1.TableStyles.Add(dgTableStyle)
endsub