473,379 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

how do i remove a data grid table style

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
Jul 21 '05 #1
2 4404
Hi,

DataGrid1.TableStyles.Clear()

Ken

------------------------

"Tonya" <s@y> wrote in message
news:00****************************@phx.gbl...
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

Jul 21 '05 #2
To remove just on of them:
DataGrid1.TableStyles.Remove(myTableStyle)
or
DataGrid1.TableStyles.RemoveAt(0)

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Ken Tucker [MVP]" <vb***@bellsouth.net> schreef in bericht
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi,

DataGrid1.TableStyles.Clear()

Ken

------------------------

"Tonya" <s@y> wrote in message
news:00****************************@phx.gbl...
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


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jordan O'Hare | last post by:
Hello Everyone, I am after some help with the following: I have a windows application that contains a list box and two data grids. All three controls are binded to a dataset that contains...
12
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that...
31
by: Greg Scharlemann | last post by:
Given some recent success on a simple form validation (mainly due to the kind folks in this forum), I've tried to tackle something a bit more difficult. I'm pulling data down from a database and...
3
by: pmud | last post by:
Hi, I have a web page (asp.net, code:c#). I havean html table with text boxes. Based on the user input , records are displayed in the data grid below it. Now the datagrid has a large no. of...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
7
by: What-a-Tool | last post by:
Have an Access table loaded into a DataTable that was created at run time, and am displaying these contents in a data grid. Me.dgGames.DataSource = Me.DsGameInfo.Tables("Games") I would like to...
2
by: Tonya | last post by:
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...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.