Solved

tablestyle in DatagridView

Posted on 2008-06-23
3
1,244 Views
Last Modified: 2008-07-02
hi there i used to have this line on a datagrid and it seems to be working:
Me.DGridAPD.TableStyles.AddRange(New System.Windows.Forms.DataGridTableStyle() {Me.DataGridTableStyle1})
       
how can i converted if i change it the original datagrid to a datagridview

Thanks,
jsctechy
0
Comment
Question by:jsctechy
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 21848011
Are you working with Web or Windows desktop objects?
0
 
LVL 1

Author Comment

by:jsctechy
ID: 21849345
Windows!
0
 
LVL 23

Accepted Solution

by:
Christopher Kile earned 500 total points
ID: 21849906
OK! :)  What version of Visual Studio are you using? and what version of .NET?  I ask this in particular because .NET 3.0 restored DataGrid to the .NET Framework and it will remain there for a while (I'm looking at docs for the .NET 3.5 DataGrid in one of my other windows).

That said,

http://msdn.microsoft.com/en-us/library/ms171628(VS.80).aspx

discusses the differences between the DataGrid and DataGridView objects on Windows.  Though I haven't seen it specifically mentioned, it looks to me as if TableStyle has gone the way of the Great Auk.  This article does specifically mention that while one DataGrid can be used to display two tables in a hierarchical relationship, two DataGridViews would be required to do the same.

We may still be able to get the special effects you want using the CellFormatting event.  Here, you can inspect DataSource and DataMember names to give special behaviors to specific tables and to specific columns in those tables if necessary.  What else do you need to do that was being done for you by setting TableStyles?

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now