hey everyone..

For some reason when I add a table style to my datagrid, it shows duplicate records....so if there is supposed to be 2 items..then it will display 4?? It only does this when I add the tablestlye.

Here is the code that I use to format the table style..
Depending on the value of the IsNew variable, depends which table stlye I add!

Private Sub FormatGridWithTableStyles()
With DataGrid1
.BackColor = Color.GhostWhite
.BackgroundColor = Color.Lavender
.BorderStyle = BorderStyle.None
'.GridLineStyle = DataGridLineStyle.None
.RowHeadersVisible = False
.CaptionVisible = False
'.CaptionBackColor = Color.Navy
'.CaptionFont = New Font("Tahoma", 10.0!, FontStyle.Bold)
'.CaptionForeColor = Color.Yellow
'.CaptionText = "Newly Added Parts:"
.Font = New Font("Tahoma", 8.0!)
.ParentRowsBackColor = Color.Lavender
.ParentRowsForeColor = Color.MidnightBlue
End With

With grdTableStyle1
.AlternatingBackColor = Color.GhostWhite
.BackColor = Color.GhostWhite
.ForeColor = Color.MidnightBlue
'.GridLineStyle = DataGridLineStyle.None
.RowHeadersVisible = False
.GridLineColor = Color.RoyalBlue
.HeaderBackColor = Color.MidnightBlue
.HeaderFont = New Font("Tahoma", 8.0!, FontStyle.Bold)
.HeaderForeColor = Color.Lavender
.SelectionBackColor = Color.Navy
.SelectionForeColor = Color.Yellow
.MappingName = "mPartsNumber"
.PreferredColumnWidth = 100
.PreferredRowHeight = 15
End With

Dim grdcolstyle1 As New DataGridTextBoxColumn()
With grdcolstyle1
.HeaderText = "ITEM"
.MappingName = "PAR_NUMBER"
.Width = 67
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

Dim grdColStyle2 As New DataGridTextBoxColumn()
With grdColStyle2
.HeaderText = "DESCRIPTION"
.MappingName = "PAR_DISC"
.Width = 214
'.ReadOnly = True
.NullText = ""
End With

Dim grdColStyle3 As New DataGridTextBoxColumn()
With grdColStyle3
.HeaderText = "PRICE"
.MappingName = "PAR_LIST"
.Format = "C"
.Width = 68
'.ReadOnly = True
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

Dim grdColStyle4 As New DataGridTextBoxColumn()
With grdColStyle4
.HeaderText = "QTY"
.MappingName = "PAR_STCK"
.Width = 54
'.ReadOnly = True
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

Dim grdColStyle5 As New DataGridTextBoxColumn()
With grdColStyle5
.HeaderText = "B/O"
.MappingName = "PAR_BO"
.Width = 43
'.ReadOnly = True
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

Dim grdColStyle6 As New DataGridTextBoxColumn()
With grdColStyle6
.HeaderText = "AMOUNT"
.MappingName = "PAR_AMOUNT"
.Width = 98
.Format = "C"
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

With grdTableStyle2
.AlternatingBackColor = Color.GhostWhite
.BackColor = Color.GhostWhite
.ForeColor = Color.MidnightBlue
'.GridLineStyle = DataGridLineStyle.None
.RowHeadersVisible = False
.GridLineColor = Color.RoyalBlue
.HeaderBackColor = Color.MidnightBlue
.HeaderFont = New Font("Tahoma", 8.0!, FontStyle.Bold)
.HeaderForeColor = Color.Lavender
.SelectionBackColor = Color.Navy
.SelectionForeColor = Color.Yellow
.MappingName = "mPartsNumber"
.PreferredColumnWidth = 100
.PreferredRowHeight = 15
End With

Dim grdcolstyle7 As New DataGridTextBoxColumn()
With grdcolstyle7
.HeaderText = "ITEM"
.MappingName = "INV_ITEM"
.Width = 67
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

Dim grdColStyle8 As New DataGridTextBoxColumn()
With grdColStyle8
.HeaderText = "DESCRIPTION"
.MappingName = "INV_DISC"
.Width = 214
'.ReadOnly = True
.NullText = ""
End With

Dim grdColStyle9 As New DataGridTextBoxColumn()
With grdColStyle9
.HeaderText = "PRICE"
.MappingName = "INV_LIST"
.Format = "C"
.Width = 68
'.ReadOnly = True
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

Dim grdColStyle10 As New DataGridTextBoxColumn()
With grdColStyle10
.HeaderText = "QTY"
.MappingName = "INV_STCK"
.Width = 54
'.ReadOnly = True
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

Dim grdColStyle11 As New DataGridTextBoxColumn()
With grdColStyle11
.HeaderText = "B/O"
.MappingName = "INV_BO"
.Width = 43
'.ReadOnly = True
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

Dim grdColStyle12 As New DataGridTextBoxColumn()
With grdColStyle12
.HeaderText = "AMOUNT"
.MappingName = "INV_AMOUNT"
.Width = 98
.Format = "C"
.NullText = ""
.Alignment = HorizontalAlignment.Center
End With

Try
If isNew = True Then
grdTableStyle1.GridColumnStyles.AddRange _
(New DataGridColumnStyle() _
{grdcolstyle1, grdColStyle2, grdColStyle3, grdColStyle4, grdColStyle5, grdColStyle6})
DataGrid1.TableStyles.Add(grdTableStyle1)
Else
grdTableStyle2.GridColumnStyles.AddRange _
(New DataGridColumnStyle() _
{grdcolstyle7, grdColStyle8, grdColStyle9, grdColStyle10, grdColStyle11, grdColStyle12})
DataGrid1.TableStyles.Add(grdTableStyle2)
End If
Catch ex As Exception
End Try

Thanks for the help in advance!!