Jerry,
I thought that this would be it.
\\\
Private Sub Button1_Click(B yVal sender As System.Object, _
ByVal e As System.EventArg s) Handles Button1.Click
For Each a As DataGridTableSt yle In DataGrid1.Table Styles
a.MappingName = Nothing
Next
DataGrid1.Table Styles(1).Mappi ngName = "Persons"
End Sub
Private Sub Button2_Click(B yVal sender As System.Object, _
ByVal e As System.EventArg s) Handles Button2.Click
For Each a As DataGridTableSt yle In DataGrid1.Table Styles
a.MappingName = Nothing
Next
DataGrid1.Table Styles(2).Mappi ngName = "Persons"
End Sub
///
And not set the Mappingname in advance
Personaly it looks for me easier just to remove constantly the first one
with
datagrid1.table styles.removeat (0)
and than replace it with a new one again with Add
I hope this helps?
Cor
"Jerry Spence1" <je**********@s omewhere.com>
I have created some definitions at design time for a Datagrid. How do I
actually switch one of the definition on - ie make it active?
I've tried Datagrid1.Table Styles.Add - but that just adds it to the
collection. I feel I need something like:
Datagrid1.Table Styles(0).activ e = True
Also, having created a style and given it a name (Style1) how do I refer
to
it?
Datagrid1.Table Styles(Style1). active = True ???
- Jerry