According to DataGridTableStyle.MappingName will automatically pickup a
DataGridTableStyle. For Example:
dim Tb1 as new dataTable("Name1")
....
dim Tb2 as new dataTable("Name2")
....
Dim tableStyle1 As New DataGridTableStyle
tableStyle1.MappingName ="Name1"
Dim tableStyle2 As New DataGridTableStyle
tableStyle2.MappingName ="Name2"
DataGrid1.TableStyle.Add(tableStyle1)
DataGrid1.TableStyle.Add(tableStyle2)
DataGrid1.DataSource=Tb1 'Use tableStyle1
DataGrid2.DataSource=Tb2 'Use tableStyle2
"Geoff Jones" wrote:
Hi
It is possible to associate several TableStyles with one DataGrid e.g.
Dim tableStyle1 As New DataGridTableStyle
Dim tableStyle2 As New DataGridTableStyle
DataGrid1.TableStyle.Add(tableStyle1)
DataGrid1.TableStyle.Add(tableStyle2)
When the grid is displayed, will it be the first Table Style that is used?
Also, how do I get the DataGrid to display the other table style?
Thanks in advance
Geoff