Are you sure this isn't working? I have this code typed into an empty form
and the tablestyle.count goes to 1 then back to 0. Maybe your doing
something else we are not seeing?
Dim TS As New DataGridTableStyle
Dim DataGrid1 As New DataGrid
TS.MappingName = "ABQTG0UN"
Datagrid1.TableStyles.Add(TS)
If (Datagrid1.TableStyles.Contains("ABQTG0UN") = True) Then
Datagrid1.TableStyles.Remove(TS)
End If
Chris
"Bob" <Bo*@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
is it possible to remove just a specific tablestyle and keep anyothers
that
may exist? I've got the folowing code:
Dim TS As New DataGridTableStyle
TS.MappingName = "ABQTG0UN"
.....
Datagrid1.TableStyles.Add(TS)
.....
If (Datagrid1.TableStyles.Contains("ABQTG0UN") = True) Then
Datagrid1.TableStyles.Remove(TS)
-------------------------
If tried both TS and "ABQTG0UN" as the argument in the .Remove, but
neither
one works.