Several DataGridTableStyles for 1 Datagrid

  • Thread starter Stan Sainte-Rose
  • Start date
S

Stan Sainte-Rose

Hi,

I have a winform with 1 datagrid and several datagridtablesStyles mapping
different datatables.
Is it possible to select a specific DataGridTableStyle for the datagrid ?
Or do I have to create one datagrid for each DataGridTableStyle ?
Stan
 
S

Stan Sainte-Rose

Thanks Ken,

I read the url but I don't know how to swap between tablestyles.
I have 4 buttons and I would like to change the appearance when I click on
each button.
I create 4 tablestyles for the same datagrid, using different tablenames
And what I m looking for is something like :
myDataGrid.TableStyles(1).selected / myDataGrid.TableStyles(2).selected



Stan
 
S

Stan Sainte-Rose

Ok, I think I found the solution

I use
myDataGrid.TableStyles.Remove(ts2)myDataGrid.TableStyles.Add(ts1)

Stan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top