how do i remove a data grid table style

  • Thread starter Thread starter Tonya
  • Start date Start date
T

Tonya

Hi,

i wanted to know how i could resolve the following error
message:

An unhandled exception of type 'System.ArgumentException'
occurred in system.dll
Additional information: The data grid table styles
collection already contains a table style with the same
mapping name.

I want to remove the data grid table style when a radio
button is selected.
at present everytime the 'yes' radio button is clicked a
data grid table style is added to format the datatable.
I get this message when i press the yes button again.

how can i remove it?

thx
 
To remove just on of them:
DataGrid1.TableStyles.Remove(myTableStyle)
or
DataGrid1.TableStyles.RemoveAt(0)
 
Back
Top