473,387 Members | 1,520 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,387 software developers and data experts.

Several DataGridTableStyles for 1 Datagrid

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
Nov 20 '05 #1
3 1235
Hi,

Yes you can have several tablestyles for a datagrid. A tablestyle
only works when the tablename is the same as the mappingname.

http://msdn.microsoft.com/library/de...ClassTopic.asp

Ken
-----------------
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:O9**************@TK2MSFTNGP11.phx.gbl...
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

Nov 20 '05 #2
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

"Ken Tucker [MVP]" <vb***@bellsouth.net> a écrit dans le message de
news:uM**************@TK2MSFTNGP12.phx.gbl...
Hi,

Yes you can have several tablestyles for a datagrid. A tablestyle
only works when the tablename is the same as the mappingname.

http://msdn.microsoft.com/library/de...ClassTopic.asp
Ken
-----------------
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:O9**************@TK2MSFTNGP11.phx.gbl...
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


Nov 20 '05 #3
Ok, I think I found the solution

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

Stan.

"Stan Sainte-Rose" <st**@cyber972.com> a écrit dans le message de
news:Og*************@TK2MSFTNGP12.phx.gbl...
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

"Ken Tucker [MVP]" <vb***@bellsouth.net> a écrit dans le message de
news:uM**************@TK2MSFTNGP12.phx.gbl...
Hi,

Yes you can have several tablestyles for a datagrid. A tablestyle
only works when the tablename is the same as the mappingname.

http://msdn.microsoft.com/library/de...ClassTopic.asp

Ken
-----------------
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:O9**************@TK2MSFTNGP11.phx.gbl...
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



Nov 20 '05 #4

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

Similar topics

1
by: Romao | last post by:
Hi, None of the C#/ADO documentation I was able to read refers what are the best practices/implementations for this "kind of" problem, I would like to get help/opinions please, let me explain...
1
by: youngeagle | last post by:
I have several datasets that I want to add to one datagrid -- how do I do that, if I can? Is there a way to insert a row before adding each dataset to the grid.
2
by: Jay | last post by:
I have an application that uses the DataGrid to list several employees. You click on a button associated with an employee to display a report on one employee in a popup window. From that report you...
9
by: eitan | last post by:
Hello, I am using Microsoft Visual Studio 2003 .NET. I have several question, please. 1) I have a connection to the database, which I create it at login, by application("conMain") (I have...
5
by: Eitan M | last post by:
Hello, 2 questions about refresh. 1) I want to do elegant refresh of the html page. When refreshing a page, the page is blink. Is there anyway to refresh the page, without the blink...
2
by: Morten Hauge | last post by:
Hi! I have a problem, I'm not sure if this is the proper way to do it, but I have the following scenario: I want to list all categories, and all products in that category whenever I select a...
1
by: John M | last post by:
Hello, For Microsoft Visual Studio .NET 2003 : In the IDE I can put a datagrid on an aspx form. One of it's property (design time) is datasource. I couldn't find any datasource component on...
3
by: Mark Wiewel | last post by:
hi all, i am a newbie in ASP.NET and i couldn't find the solution to this one: i have a form with three datagrids on it. i would like to align them vertically with a space between each grid of...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.