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

DataGridTableStyle

I'm just starting out, and it's incredibly frustrating when I see
sample code and then try to implement it.
Case in point. I'm populating a collection then binding it to a
datagrid. That works great. The problem is the columns are in the wrong
order. OK. I'll use the datagridtablestyle. But when I add the
following statement;

Dim tableStyle As New DataGridTableStyle

I get an error when I build the project;

Type 'DataGridTableStyle' is not defined.

so....is there something I have to import?

please help before I go bald from pulling out my hair!!!
thanks,
nita

Jul 26 '06 #1
3 4257
Hi,

It is part of the system.windows.forms namespace. You should not
have any problems referencing it from a windows forms application.

Ken
---------------------------
"nita" <ni*******@yahoo.comwrote in message
news:11**********************@s13g2000cwa.googlegr oups.com...
I'm just starting out, and it's incredibly frustrating when I see
sample code and then try to implement it.
Case in point. I'm populating a collection then binding it to a
datagrid. That works great. The problem is the columns are in the wrong
order. OK. I'll use the datagridtablestyle. But when I add the
following statement;

Dim tableStyle As New DataGridTableStyle

I get an error when I build the project;

Type 'DataGridTableStyle' is not defined.

so....is there something I have to import?

please help before I go bald from pulling out my hair!!!
thanks,
nita

Jul 27 '06 #2
It is part of the system.windows.forms namespace. You should not
have any problems referencing it from a windows forms application.
As long as you use a windowsform for this.

Just thinking what this crazy error can be.

Cor

"Ken Tucker [MVP]" <vb***@bellsouth.netschreef in bericht
news:Oo**************@TK2MSFTNGP05.phx.gbl...
Hi,

It is part of the system.windows.forms namespace. You should not
have any problems referencing it from a windows forms application.

Ken
---------------------------
"nita" <ni*******@yahoo.comwrote in message
news:11**********************@s13g2000cwa.googlegr oups.com...
>I'm just starting out, and it's incredibly frustrating when I see
sample code and then try to implement it.
Case in point. I'm populating a collection then binding it to a
datagrid. That works great. The problem is the columns are in the wrong
order. OK. I'll use the datagridtablestyle. But when I add the
following statement;

Dim tableStyle As New DataGridTableStyle

I get an error when I build the project;

Type 'DataGridTableStyle' is not defined.

so....is there something I have to import?

please help before I go bald from pulling out my hair!!!
thanks,
nita


Jul 27 '06 #3

nita wrote:
I'm just starting out, and it's incredibly frustrating when I see
sample code and then try to implement it.
Case in point. I'm populating a collection then binding it to a
datagrid. That works great. The problem is the columns are in the wrong
order. OK. I'll use the datagridtablestyle. But when I add the
following statement;

Dim tableStyle As New DataGridTableStyle

I get an error when I build the project;

Type 'DataGridTableStyle' is not defined.

so....is there something I have to import?

please help before I go bald from pulling out my hair!!!
thanks,
nita
This is very odd. That should work.

Try refering to it fully.

Dim tableStyle As New System.Windows.Forms.DataGridTableStyle

If that fails. Start a new project, use Windows Application, and go to
the code. Paste that line and see if it compiles.

B.

Jul 27 '06 #4

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

Similar topics

0
by: Floela | last post by:
I want to set a the MappingName of a DataGridTableStyle to "ArrayList" in an ASP.NET page, but the class is stored in the System.Windows.Forms namespace. It won't let me import the namespace at...
3
by: Rxd | last post by:
I have a Datagrid that should have a couple of hidden columns. I used a DataGridTableStyle to hide the columns and it was working fine except I needed to prevent the DataGrid from allowing new rows...
2
by: Carlos | last post by:
Does DataGridTableStyle work in ASP.net ? any time I'm tring to define a varibale lke DataGridTableStyle MyStyle = new DataGridTableStyle(); it give me "The Type or name sapce...
2
by: Scott | last post by:
Hi all. A few days ago i ask this question and got a good quick response. I tried out what they said and it worked. However I have now come to try the same thing in another program and it...
2
by: Carlos | last post by:
Does DataGridTableStyle work in ASP.net ? any time I'm tring to define a varibale lke DataGridTableStyle MyStyle = new DataGridTableStyle(); it give me "The Type or name sapce...
2
by: kerpal | last post by:
Hi all, 1. Could anyone pls clarify the difference between setting the AlternatingBackColor property in DataGridTableStyle and in DataGrid?? 2. How come BackColor and AlternatingBackColor are...
2
by: Brett Romero | last post by:
I can't find what exactly I'm doing wrong that the following DataGridTableStyle is not working on my table. The result set returns 21 columns. I'm only formatting 5 via the TableStyle. I thought...
4
by: Brett Romero | last post by:
I have the following DataGridTableStyle: DataGridTableStyle gridTableStyle = new DataGridTableStyle(); gridTableStyle.MappingName = "myStyle"; DataGridTextBoxColumn dgsc = new...
7
by: Mitchell S. Honnert | last post by:
Is there an equivalent of the DataGrid's DataGridTableStyle for the DataGridView? If not, is there an easy way to duplicate the DataGridTableStyle's functionality for the DataGridView? Here's...
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:
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
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.